BlockElementsExtension
class BlockElementsExtension extends Twig_Extension
Class BlockElementsExtension is injected as empire_block_elements_extension service. BlockElementsExtension handles the logic and provides necessary data for managed entity in twig.
Constants
| BLOCK_ELEMENT_PATH |
Path to generated block elements |
Properties
| protected BlockElementsManager | $blockElementsManager |
Methods
No description
{@inheritdoc}
{@inheritdoc}
Get array of products for array of ids
Get array of products for algorithm
Get array of categories for array of ids
Get array of attribute values for array of ids
Get array of brands for array of ids
Get array of all blocks available for page builder
No description
Prepare block title
No description
Get array containing title and rendered twig for block id
Get multiple rendered blocks
Get block element from cache
No description
Details
at line 63
__construct(BlockElementsManager $blockElementsManager, Twig_Environment $environment, mixed $cache)
at line 73
getFunctions()
{@inheritdoc}
at line 104
getFilters()
{@inheritdoc}
at line 125
array
getProductsByIds(array $ids)
Get array of products for array of ids
at line 137
array
getProductsByAlgorithm(string $algorithm, int $numberOfProducts)
Get array of products for algorithm
at line 148
array
getCategories(array $ids)
Get array of categories for array of ids
at line 159
array
getAttributeValues(array $ids)
Get array of attribute values for array of ids
at line 170
array
getBrands(array $ids)
Get array of brands for array of ids
at line 179
array
getAllBlocksForPageBuilder()
Get array of all blocks available for page builder
at line 193
getBlockForId(Twig_Environment $twigEnvironment, int $id)
at line 212
string
prepareTitle(string $title)
Prepare block title
at line 231
bool|simple_html_dom
parseForBlock(Twig_Environment $twigEnvironment, string $string)
at line 257
array
renderBlockForId(mixed $id)
Get array containing title and rendered twig for block id
at line 276
array
getBlockElementsById(array $ids)
Get multiple rendered blocks
at line 298
string
getCachedBlockElement(string $template, string $locale)
Get block element from cache