/** * 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; }
/** * @param string $rootType * @param Frame $current * @param Frame|null $previous * * @return bool[] */ private function getIfTargets($rootType, Frame $current, Frame $previous = null) { $currentIsTarget = $this->parameterAnalyzer->isPathIncluded($current->getPath(), $rootType); $parentIsTarget = $previous === null || $this->parameterAnalyzer->isPathIncluded($previous->getPath(), $rootType); return [$parentIsTarget, $currentIsTarget]; }
/** * @param Frame $current * @param Frame|null $previous * * @return bool[] */ private function getIfTargets(Frame $current, Frame $previous = null) { $parentIsTarget = $previous === null || $this->parameters->isPathIncluded($previous->getPath()); $currentIsTarget = $this->parameters->isPathIncluded($current->getPath()); return [$parentIsTarget, $currentIsTarget]; }