Skip to content

Latest commit

 

History

History
206 lines (141 loc) · 6.03 KB

PageRstLinkerPlugin.md

File metadata and controls

206 lines (141 loc) · 6.03 KB

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


namespace BumbleDocGen\Core\Plugin\CorePlugin\PageLinker;

final class PageRstLinkerPlugin extends \BumbleDocGen\Core\Plugin\CorePlugin\PageLinker\BasePageLinker implements \BumbleDocGen\Core\Plugin\PluginInterface, \Symfony\Component\EventDispatcher\EventSubscriberInterface
Adds URLs to empty links in rst 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:

`Existent page name`_ => `Existent page name </docs/some/page/targetPage.rst>`_
`Non-existent page name`_ => 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