I am loading plugins using my modules Config\Registrar.php:
Code:
class Registrar
{
public static function View(): array
{
return [
'plugins' => [
'include' => '\Modules\CMS\Libraries\ParserPlugins::include',
'test' => '\Modules\CMS\Libraries\ParserPlugins::test',
],
];
}
}
My ParserPlugins class contains the following:
Code:
class ParserPlugins
{
public static function include(array $params = [])
{
$parser = \Config\Services::parser();
return $parser->render(...$params);
}
public static function test(array $params = [])
{
return 'Test';
}
}
I try to use opening and closing plugin tags like so:
Code:
{+ test +} inner content {+ /test +}
However, the only params I can access are those I add to the opening tag. I am unsure how to access the content between the tags.
The closing tag is also still be rendered on the page as
.