BlockElementsManager
class BlockElementsManager implements BasicEntityManagerInterface, JQGridInterface
Class BlockElementsManager is injected as empire_block_elements.manager service. BlockElementsManager handles the logic for entity.
Traits
Constants
| VIEWS_DIR |
Path to views directory |
| GENERATED_TEMPLATES_DIR |
Path to directory where generated blocks are stored |
Properties
| protected BlockElementsRepository | $repository | ||
| protected BlockElementsEventContainer | $eventContainer | ||
| protected BlockElementsTemplatesManager | $templatesManager |
Methods
No description
No description
No description
Get entities from database by ids
BlockElementsManager constructor.
Get single BlockElement by id
Find all block elements for location and entity name
Get block element data for specified id
Generate unique file name base on entity, title and algorithm params
Create rendered block element
Dispatch event that returns content for block element
Delete multiple block elements based on array of ids
No description
Get all templates available for selection
Get all entities available for block elements
Get all available algorithms for entity
Get params for algorithm and entity
Get brands for ids
Search all products for params
Get product from db for ids
No description
Get products for specified ids
Get brands for array of ids
Get categories for array of ids
Get attribute collection for array of ids
Get id and name for specified entities
No description
get images for entity
Refresh all layouts
Get array of all block elements
Get twig loader
Get templating engine
Get all Block elements for specified entity
Add custom layout
Get all blocks for theme, param can be theme name of theme id
Get all block elements for defined params
Get all Block elements for specified layout title
Get list of block, active blocks and active plugins for export
Import block elements from file
Get names for all entity relationships
Get all templates for specified entity
Details
in JQGridManagerTrait at line 26
mixed
searchForJQGRID(array $searchParams, array $sortParams = array(), array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)
in JQGridManagerTrait at line 40
mixed
findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)
in JQGridManagerTrait at line 53
mixed
getCountForJQGRID(array|null $searchParams = null, array|null $sortParams = null, array|null $additionalParams = array(), JQGridWrapper|null $jqGridWrapper = null)
in BlockElementManagerTrait at line 28
array
getEntitiesForBlockElementsExtension(array $ids)
Get entities from database by ids
in BlockElementManagerTrait at line 40
array
getEntityNamesForIds(array $ids)
Get id and name of entity
at line 65
__construct(BlockElementsRepository $repository, BlockElementsEventContainer $eventContainer, BlockElementsTemplatesManager $templatesManager)
BlockElementsManager constructor.
at line 78
BlockElement
getBlockElement(int $id)
Get single BlockElement by id
at line 90
array
getBlockElementByLocation(string $location, string $entityName)
Find all block elements for location and entity name
at line 103
array
getBlockElementSimple(int $id)
Get block element data for specified id
at line 116
array
saveBlockElement(BlockElement $blockElement)
Save and generate BlockElement
at line 177
array
editBlockElement(BlockElement $newBlockElement)
Edit block element
at line 270
string
generateFileName(string $entity, string $title, null $algorithmParams = null)
Generate unique file name base on entity, title and algorithm params
at line 283
bool|string
createLayoutTwig(BlockElement $blockElement, string $generatedName, bool $checkLayoutNameUnique = true)
Create rendered block element
at line 371
EventWithResult
dispatchBlockElementsContentEvent(array $paramBag)
Dispatch event that returns content for block element
at line 382
bool|string
deleteBlockElements(array $ids)
Delete multiple block elements based on array of ids
at line 425
array
getAllBlocks()
at line 434
array
getAvailableTemplates()
Get all templates available for selection
at line 472
array
getAvailableEntities()
Get all entities available for block elements
at line 495
array
getPluginsAlgorithms(null|string $entity = null)
Get all available algorithms for entity
at line 507
array
getAlgorithmParams(mixed $entity, mixed $algorithmKey)
Get params for algorithm and entity
at line 518
array
getBrands(array $ids)
Get brands for ids
at line 532
QueryBuilder
searchProducts(mixed $searchParam, mixed $page, mixed $offset, mixed $ignoreIds)
Search all products for params
at line 545
array
getProductsByIds(array $ids)
Get product from db for ids
at line 553
mixed
getCurrentThemeName()
at line 565
array
getProductsByAlgorithm(string $algorithm, int $numberOfProducts)
Get products for specified ids
at line 576
array
getBrandsFromCache(array $ids)
Get brands for array of ids
at line 587
array
getCategoriesFromCache(array $ids)
Get categories for array of ids
at line 598
array
getAttributeValuesFromCache(array $ids)
Get attribute collection for array of ids
at line 610
array
getPluginEntityNames(string $entity, array $ids)
Get id and name for specified entities
at line 625
array|mixed
getAllLayouts()
at line 638
string
getImageLink(string $entity)
get images for entity
at line 659
array
refreshLayouts()
Refresh all layouts
at line 684
array
getAllBlocksForPageBuilder()
Get array of all block elements
at line 693
object|Twig_Environment
getTwigLoader()
Get twig loader
at line 702
object
getTemplatingEngine()
Get templating engine
at line 713
array
findByEntity(string $entity)
Get all Block elements for specified entity
at line 724
BlockElement|string
handleEntityDeletedEvent(BlockElement $blockElement)
Edit Block Element
at line 740
bool
addNewCustomLayout(string $layout)
Add custom layout
at line 758
array
findBlocksByTheme(string|int $theme)
Get all blocks for theme, param can be theme name of theme id
at line 769
array
getBlocksForTmce(array $params)
Get all block elements for defined params
at line 780
array
findBlockByLayoutTitle(string $title)
Get all Block elements for specified layout title
at line 791
array
exportBlockElements(array|null $blocks)
Get list of block, active blocks and active plugins for export
at line 809
bool|string
importBlockElements(string $file, string $name)
Import block elements from file
at line 907
array
getEntityRelationshipNames()
Get names for all entity relationships
at line 918
array
getTemplatesForEntity(string $entity)
Get all templates for specified entity