/** * Set path to current frame. */ private function setCurrentPath() { if ($this->previous === null || $this->previous->getPath() === null) { $this->path = $this->relationship->getName(); } else { $this->path = $this->previous->getPath() . '.' . $this->relationship->getName(); } }
/** * Set path to current frame. */ private function setCurrentPath() { if ($this->previous === null || $this->previous->getPath() === null) { $this->path = $this->relationship->getName(); } else { $this->path = $this->previous->getPath() . DocumentInterface::PATH_SEPARATOR . $this->relationship->getName(); } }
/** * @param mixed $resource * @param StackFrameReadOnlyInterface $frame * * @return SchemaProviderInterface */ private function getSchema($resource, StackFrameReadOnlyInterface $frame) { try { $schema = $this->container->getSchema($resource); } catch (InvalidArgumentException $exception) { $message = T::t('Schema is not registered for a resource at path \'%s\'.', [$frame->getPath()]); throw new InvalidArgumentException($message, 0, $exception); } return $schema; }
/** * If relationship from 'parent' to 'current' resource passes field set filter. * * @param Frame $current * @param Frame $previous * * @return bool */ private function isRelationshipInFieldSet(Frame $current, Frame $previous) { $parentType = $previous->getResource()->getType(); $parameters = $this->parameterAnalyzer->getParameters(); if (($fieldSet = $parameters->getFieldSet($parentType)) === null) { return true; } return in_array($current->getRelationship()->getName(), $fieldSet, true) === true; }