Skip to content

Latest commit

 

History

History
232 lines (155 loc) · 5.25 KB

GetDocumentationPageUrl_2.md

File metadata and controls

232 lines (155 loc) · 5.25 KB

BumbleDocGen / Technical description of the project / Renderer / Template functions / GetDocumentationPageUrl


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') }}

Settings:

Function name: getDocumentationPageUrl

Initialization methods:

  1. __construct

Methods:

  1. __invoke
  2. getName
  3. getOptions

Constants:

Method details:

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 -

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:


public static function getName(): string;

Parameters: not specified

Return value: string


public static function getOptions(): array;

Parameters: not specified

Return value: array