Skip to content

Latest commit

 

History

History
227 lines (157 loc) · 6.16 KB

GeneratePageBreadcrumbs.md

File metadata and controls

227 lines (157 loc) · 6.16 KB

BumbleDocGen / Technical description of the project / Class map / GeneratePageBreadcrumbs


namespace BumbleDocGen\Core\Renderer\Twig\Function;

final class GeneratePageBreadcrumbs implements \BumbleDocGen\Core\Renderer\Twig\Function\CustomFunctionInterface
Function to generate breadcrumbs on the page

Settings:

Function name: generatePageBreadcrumbs

Initialization methods:

  1. __construct

Methods:

  1. __invoke
  2. getName
  3. getOptions

Method details:

public function __construct(\BumbleDocGen\Core\Renderer\Breadcrumbs\BreadcrumbsHelper $breadcrumbsHelper, \BumbleDocGen\Core\Renderer\Context\RendererContext $rendererContext, \BumbleDocGen\Core\Renderer\Context\Dependency\RendererDependencyFactory $dependencyFactory);

Parameters:

Name Type Description
$breadcrumbsHelper \BumbleDocGen\Core\Renderer\Breadcrumbs\BreadcrumbsHelper -
$rendererContext \BumbleDocGen\Core\Renderer\Context\RendererContext -
$dependencyFactory \BumbleDocGen\Core\Renderer\Context\Dependency\RendererDependencyFactory -

public function __invoke(string $currentPageTitle, string $templatePath, bool $skipFirstTemplatePage = true): string;

Parameters:

Name Type Description
$currentPageTitle string Title of the current page
$templatePath string Path to the template from which the breadcrumbs will be generated
$skipFirstTemplatePage bool If set to true, the page from which parsing starts will not participate in the formation of breadcrumbs This option is useful when working with the _self value in a template, as it returns the full path to the current template, and the reference to it in breadcrumbs should not be clickable.

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