/** * @param string $namespace * @param bool $skipLast * @return string */ public function namespaceLinks($namespace, $skipLast = true) { if (!$this->elementStorage->getNamespaces()) { return $namespace; } $links = []; $parent = ''; foreach (explode('\\', $namespace) as $part) { $parent = ltrim($parent . '\\' . $part, '\\'); $links[] = $skipLast || $parent !== $namespace ? $this->linkBuilder->build($this->namespaceUrl($parent), $part) : $part; } return implode('\\', $links); }
/** * @param string $value * @return string */ private function processLinkAnnotations($value) { list($url, $description) = Strings::split($value); if (Validators::isUrl($url)) { return $this->linkBuilder->build($url, $description ?: $url); } return null; }
/** * @return string */ private function createForFunction(FunctionReflectionInterface $reflectionFunction, array $classes) { return $this->linkBuilder->build($this->elementUrlFactory->createForFunction($reflectionFunction), $reflectionFunction->getName() . '()', TRUE, $classes); }