Skip to content

Latest commit

 

History

History
216 lines (147 loc) · 6.28 KB

PageHtmlLinkerPlugin.md

File metadata and controls

216 lines (147 loc) · 6.28 KB

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


namespace BumbleDocGen\Core\Plugin\CorePlugin\PageLinker;

final class PageHtmlLinkerPlugin extends \BumbleDocGen\Core\Plugin\CorePlugin\PageLinker\BasePageLinker implements \BumbleDocGen\Core\Plugin\PluginInterface, \Symfony\Component\EventDispatcher\EventSubscriberInterface
Adds URLs to empty links in HTML format; Links may contain: 1) Short entity name 2) Full entity name 3) Relative link to the entity file from the root directory of the project 4) Page title ( title ) 5) Template key ( BreadcrumbsHelper::getTemplateLinkKey() ) 6) Relative reference to the entity document from the root directory of the documentation

Examples of using:

<a>Existent page name</a> => <a href="/docs/some/page/targetPage.html">Existent page name</a>
<a x-title="Custom title">\Namespace\ClassName</a> => <a href="/docs/some/page/ClassName.md">Custom title</a>
<a>\Namespace\ClassName</a> => <a href="/docs/some/page/ClassName.md">\Namespace\ClassName</a>
<a>Non-existent page name</a> => Non-existent page name

Initialization methods:

  1. __construct

Methods:

  1. beforeCreatingDocFile
  2. getSubscribedEvents - Returns an array of event names this subscriber wants to listen to.

Method details:

// Implemented in BumbleDocGen\Core\Plugin\CorePlugin\PageLinker\BasePageLinker

public function __construct(\BumbleDocGen\Core\Renderer\Breadcrumbs\BreadcrumbsHelper $breadcrumbsHelper, \BumbleDocGen\Core\Parser\Entity\RootEntityCollectionsGroup $rootEntityCollectionsGroup, \BumbleDocGen\Core\Renderer\Twig\Function\GetDocumentedEntityUrl $getDocumentedEntityUrlFunction, \Psr\Log\LoggerInterface $logger);

Parameters:

Name Type Description
$breadcrumbsHelper \BumbleDocGen\Core\Renderer\Breadcrumbs\BreadcrumbsHelper -
$rootEntityCollectionsGroup \BumbleDocGen\Core\Parser\Entity\RootEntityCollectionsGroup -
$getDocumentedEntityUrlFunction \BumbleDocGen\Core\Renderer\Twig\Function\GetDocumentedEntityUrl -
$logger \Psr\Log\LoggerInterface -

// Implemented in BumbleDocGen\Core\Plugin\CorePlugin\PageLinker\BasePageLinker

public function beforeCreatingDocFile(\BumbleDocGen\Core\Plugin\Event\Renderer\BeforeCreatingDocFile $event): void;

Parameters:

Name Type Description
$event \BumbleDocGen\Core\Plugin\Event\Renderer\BeforeCreatingDocFile -

Return value: void

Throws:


// Implemented in BumbleDocGen\Core\Plugin\CorePlugin\PageLinker\BasePageLinker

public static function getSubscribedEvents(): array;
Returns an array of event names this subscriber wants to listen to.

Parameters: not specified

Return value: array