AlligatorPluginExtension
class AlligatorPluginExtension extends Twig_Extension
Class AlligatorPluginExtension is injected as twig.extension.alligator.plugins service. AlligatorPluginExtension handles the logic and provides necessary data for managed entity in twig.
Constants
| HTML_F_TAG_KEY |
|
| CACHED_PLUGINS_LAYOUTS |
|
| CACHED_ACTIVE_PLUGINS_LAYOUTS |
|
Properties
| static string | $pluginsFileFullPath | ||
| static bool | $recordLayoutNames | Shout extension record all calls | |
| static array | $layoutNamesArray | Array to hold all layout names |
Methods
AlligatorPluginExtension constructor.
{@inheritdoc}
Find all plugins
Execute string as command
Render and display all templates for layout. If $recordLayoutNames is TRUE, save layout names for later use
Find all templates for specific layout. If $uniqueLayout is TRUE then only one template can be registered for specified layout
Returns the name of the extension.
No description
No description
Returns script or style tag, from cache or directly from file
Generate and cache all layouts
Get number of template for specific layout
Prepare data and render template from theme, otherwise from plugin
Details
at line 88
__construct(Client $cache)
AlligatorPluginExtension constructor.
at line 103
getFunctions()
{@inheritdoc}
at line 121
static array
getAllPlugins(string|null $pluginMainPathInput = null)
Find all plugins
at line 154
mixed
doEvalFunction(string $string)
Execute string as command
at line 172
getPluginForLayout(Twig_Environment $twigEnvironment, mixed $layoutName = null, array $data = array())
Render and display all templates for layout. If $recordLayoutNames is TRUE, save layout names for later use
at line 193
mixed|null
getTemplatesForLayout(string $layoutName, bool $uniqueLayout = false)
Find all templates for specific layout. If $uniqueLayout is TRUE then only one template can be registered for specified layout
at line 216
string
getName()
Returns the name of the extension.
at line 224
static
setPluginsFileFullPath(string $pluginsFileFullPath)
at line 232
static string|null
getPluginsFileFullPath()
at line 256
string
putAllInTag(Twig_Environment $twigEnvironment, string $key, array $data = [], string $type = 'script', bool $cachable = true, int $lifeTime = 0)
Returns script or style tag, from cache or directly from file
at line 291
static array
generateLayouts(mixed $themeViews, mixed $themeName = FRONTEND_THEME_TITLE, bool|true $onlyActivePlugins = true, bool|true $findActiveTemplates = true)
Generate and cache all layouts
at line 351
int
getCountForLayout(string $layoutName)
Get number of template for specific layout
at line 364
string|bool
renderTwigTemplate(Twig_Environment $twigEnvironment, null $templateName = null, array $data = array())
Prepare data and render template from theme, otherwise from plugin