BumbleDocGen / Technical description of the project / Configuration files / GeneratePageBreadcrumbs
GeneratePageBreadcrumbs class:
namespace BumbleDocGen\Core\Renderer\Twig\Function;
final class GeneratePageBreadcrumbs implements \BumbleDocGen\Core\Renderer\Twig\Function\CustomFunctionInterfaceFunction to generate breadcrumbs on the page
| Function name: | generatePageBreadcrumbs |
- # __construct | source code
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 | - |
- # __invoke | source code
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:
- # 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