Skip to content

Latest commit

 

History

History
201 lines (135 loc) · 4.74 KB

LoadPluginsContent.md

File metadata and controls

201 lines (135 loc) · 4.74 KB

BumbleDocGen / Technical description of the project / Renderer / Template functions / LoadPluginsContent


⚠️ Is internal

namespace BumbleDocGen\Core\Renderer\Twig\Function;

final class LoadPluginsContent implements \BumbleDocGen\Core\Renderer\Twig\Function\CustomFunctionInterface
Process entity template blocks with plugins. The method returns the content processed by plugins.

Examples of using:

{{ loadPluginsContent('some text', entity, constant('BumbleDocGen\\Plugin\\BaseTemplatePluginInterface::BLOCK_AFTER_HEADER')) }}

Settings:

Function name: loadPluginsContent

Initialization methods:

  1. __construct

Methods:

  1. __invoke
  2. getName
  3. getOptions

Method details:

public function __construct(\BumbleDocGen\Core\Plugin\PluginEventDispatcher $pluginEventDispatcher);

Parameters:

Name Type Description
$pluginEventDispatcher \BumbleDocGen\Core\Plugin\PluginEventDispatcher -

public function __invoke(string $content, \BumbleDocGen\Core\Parser\Entity\RootEntityInterface $entity, string $blockType): string;

Parameters:

Name Type Description
$content string Content to be processed by plugins
$entity \BumbleDocGen\Core\Parser\Entity\RootEntityInterface The entity for which we process the content block
$blockType string Content block type. @see BaseTemplatePluginInterface::BLOCK_*

Return value: string


public static function getName(): string;

Parameters: not specified

Return value: string


public static function getOptions(): array;

Parameters: not specified

Return value: array