Guides

AssetsExtension extends AbstractExtension
in package

FinalYes

Table of Contents

Properties

$documentNameResolver  : DocumentNameResolverInterface
$logger  : LoggerInterface
$menuExtension  : GlobalMenuExtension
$nodeRenderer  : NodeRenderer
$urlGenerator  : UrlGeneratorInterface

Methods

__construct()  : mixed
asset()  : string
Copies the referenced asset and returns the canonical path to that asset; thus taking the BASE tag into account.
getFunctions()  : array<string|int, TwigFunction>
getTests()  : array<string|int, TwigTest>
renderBreadcrumb()  : string
renderLink()  : string
renderMenu()  : string
renderNode()  : string
renderOrderedListType()  : string
renderTarget()  : string
copyAsset()  : string
getRenderContext()  : RenderContext

Properties

Methods

asset()

Copies the referenced asset and returns the canonical path to that asset; thus taking the BASE tag into account.

public asset(RenderContext} $context, string $path) : string

The layout for guides includes a BASE tag in the head, which creates the need for all relative urls to actually be relative not to the current file's path; but the root of the Documentation Set. This means that, when rendering paths, you always need to include the canonical path; not that relative to the current file.

Parameters
$context : RenderContext}
$path : string
Return values
string

getFunctions()

public getFunctions() : array<string|int, TwigFunction>
Return values
array<string|int, TwigFunction>

getTests()

public getTests() : array<string|int, TwigTest>
Return values
array<string|int, TwigTest>

renderBreadcrumb()

public renderBreadcrumb(RenderContext} $context) : string
Parameters
$context : RenderContext}
Return values
string
public renderLink(RenderContext} $context, string $url[, string|null $anchor = null ]) : string
Parameters
$context : RenderContext}
$url : string
$anchor : string|null = null
Return values
string

renderMenu()

public renderMenu(RenderContext} $context, string $menuType[, int $maxMenuCount = 0 ]) : string
Parameters
$context : RenderContext}
$menuType : string
$maxMenuCount : int = 0
Return values
string

renderNode()

public renderNode(RenderContext} $context, Node|array<string|int, Node>|null $node) : string
Parameters
$context : RenderContext}
$node : Node|array<string|int, Node>|null
Return values
string

renderOrderedListType()

public renderOrderedListType(string $listType) : string
Parameters
$listType : string
Return values
string

renderTarget()

public renderTarget(RenderContext} $context, Target $target) : string
Parameters
$context : RenderContext}
$target : Target
Return values
string

        
On this page

Search results