Skip to content

Latest commit

 

History

History
227 lines (151 loc) · 5.35 KB

DrawDocumentedEntityLink.md

File metadata and controls

227 lines (151 loc) · 5.35 KB

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


namespace BumbleDocGen\Core\Renderer\Twig\Function;

final class DrawDocumentedEntityLink implements \BumbleDocGen\Core\Renderer\Twig\Function\CustomFunctionInterface
Creates an entity link by object

Examples of using:

{{ drawDocumentedEntityLink($entity, 'getFunctions()') }}
{{ drawDocumentedEntityLink($entity) }}
{{ drawDocumentedEntityLink($entity, '', false) }}

Settings:

Function name: drawDocumentedEntityLink

Initialization methods:

  1. __construct

Methods:

  1. __invoke
  2. getName
  3. getOptions

Method details:

public function __construct(\BumbleDocGen\Core\Renderer\Twig\Function\GetDocumentedEntityUrl $getDocumentedEntityUrlFunction);

Parameters:

Name Type Description
$getDocumentedEntityUrlFunction \BumbleDocGen\Core\Renderer\Twig\Function\GetDocumentedEntityUrl -

public function __invoke(\BumbleDocGen\Core\Parser\Entity\RootEntityInterface $entity, string $cursor = '', bool $useShortName = true): string;

Parameters:

Name Type Description
$entity \BumbleDocGen\Core\Parser\Entity\RootEntityInterface The entity for which we want to get the link
$cursor string Reference to an element inside an entity, for example, the name of a function/constant/property
$useShortName bool Use the full or short entity name in the link

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