BumbleDocGen / Technical description of the project / Renderer / Template functions / GetDocumentationPageUrl
GetDocumentationPageUrl class:
namespace BumbleDocGen\Core\Renderer\Twig\Function;
final class GetDocumentationPageUrl implements \BumbleDocGen\Core\Renderer\Twig\Function\CustomFunctionInterface
Creates an entity link by object
Examples of using:
{{ getDocumentationPageUrl('Page name') }}
{{ getDocumentationPageUrl('/someDir/someTemplate.md.twig') }}
{{ getDocumentationPageUrl('/docs/someDir/someDocFile.md') }}
{{ getDocumentationPageUrl('readme.md') }}
Function name: | getDocumentationPageUrl |
- #
DEFAULT_URL
| source code
- # __construct | source code
public function __construct(\BumbleDocGen\Core\Renderer\Breadcrumbs\BreadcrumbsHelper $breadcrumbsHelper, \Psr\Log\LoggerInterface $logger);
Parameters:
Name | Type | Description |
---|---|---|
$breadcrumbsHelper | \BumbleDocGen\Core\Renderer\Breadcrumbs\BreadcrumbsHelper | - |
$logger | \Psr\Log\LoggerInterface | - |
- # __invoke | source code
public function __invoke(string $key): string;
Parameters:
Name | Type | Description |
---|---|---|
$key | string | The key by which to look up the URL of the page. Can be the title of a page, a path to a template, or a generated document |
Return value: string
Throws:
- # getName | source code
public static function getName(): string;
Parameters: not specified
Return value: string
- # getOptions | source code
public static function getOptions(): array;
Parameters: not specified
Return value: array