BumbleDocGen / Technical description of the project / Renderer / Template functions / LoadPluginsContent
LoadPluginsContent class:
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')) }}
Function name: | loadPluginsContent |
- # __construct | source code
public function __construct(\BumbleDocGen\Core\Plugin\PluginEventDispatcher $pluginEventDispatcher);
Parameters:
Name | Type | Description |
---|---|---|
$pluginEventDispatcher | \BumbleDocGen\Core\Plugin\PluginEventDispatcher | - |
- # __invoke | source code
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
- # getName | source code
public static function getName(): string;
Parameters: not specified
Return value: string
- # getOptions | source code
public static function getOptions(): array;
Parameters: not specified
Return value: array