class BlockElementsRepository extends EntityRepository implements AbstractBlockElementRepositoryInterface

Class BlockElementsRepository is injected as empire_block_elements.repository service. BlockElementsRepository is used for crud operation for entity.

Use this class to work with database.

Traits

Trait JQGridTrait

Constants

ALIAS

Alias for main entity

BLOCK_TEMPLATE_ALIAS

Alias for block template

THEME_ALIAS

Alias for theme

BLOCK_RESULT_CACHE

Cache key

Methods

jQGridJoinFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)

All joins used in select.

jQGridGroupByFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)

Should contain group by which jqgrid uses.

array
findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams, JQGridWrapper $jqGridWrapper)

JQGrid function

array
searchForJQGRID(array $searchParams, array $sortParams, bool $isCountSearch = false, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

JQGrid function

BlockElement|string
save(BlockElement $object)

Save Block Element

bool|string
saveMultiple(array $elements, int $flushNumber = 30)

Save multiple block elements

BlockElement|string
edit(BlockElement $object)

Edit Block Element

bool|string
deleteMultiple(array $objects)

Delete multiple Block Elements

array
getBlocksByIds(array $ids)

Get multiple blocks by array of ids

array
getAllBlocksForPageBuilder()

Get array of all block elements

array
getBlockElementSimple(int $id)

Get block element data for specified id

array
findByEntity(string $entity)

Get all Block elements for specified entity

array
findBlockByLayoutTitle(string $title)

Get all Block elements for specified layout title

array
getBlocksForTmce(array $params)

Get all block elements for defined params

array
findBlocksByTheme(string|int $theme)

Get all blocks for theme, param can be theme name of theme id

array
getEntitiesForBlockElementsExtension(array $ids)

No description

array
getEntityNamesForIds(array $ids)

No description

array
findBlockByLocation(string $location, string $entityName)

Find all block elements for location and entity name

array
findAllWithTemplatesAsArray(array|null $blocks = null)

Get all block elements with theme name and template data

Details

in JQGridTrait at line 27
jQGridJoinFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)

All joins used in select.

Override in the repository class if needed. Should do nothing otherwise

Parameters

QueryBuilder $qb
JQGridWrapper $jqGridWrapper

in JQGridTrait at line 42
jQGridGroupByFields(QueryBuilder $qb, JQGridWrapper $jqGridWrapper)

Should contain group by which jqgrid uses.

Override in the repository class if needed. Should do nothing otherwise

Parameters

QueryBuilder $qb
JQGridWrapper $jqGridWrapper

in JQGridTrait at line 61
array findAllForJQGRID(int $page, int $offset, array $sortParams, array $additionalParams, JQGridWrapper $jqGridWrapper)

JQGrid function

Parameters

int $page
int $offset
array $sortParams
array $additionalParams
JQGridWrapper $jqGridWrapper

Return Value

array

in JQGridTrait at line 94
array searchForJQGRID(array $searchParams, array $sortParams, bool $isCountSearch = false, array $additionalParams = array(), JQGridWrapper $jqGridWrapper = null)

JQGrid function

Parameters

array $searchParams
array $sortParams
bool $isCountSearch
array $additionalParams
JQGridWrapper $jqGridWrapper

Return Value

array

at line 57
BlockElement|string save(BlockElement $object)

Save Block Element

Parameters

BlockElement $object

Return Value

BlockElement|string

at line 79
bool|string saveMultiple(array $elements, int $flushNumber = 30)

Save multiple block elements

Parameters

array $elements
int $flushNumber

Return Value

bool|string

at line 108
BlockElement|string edit(BlockElement $object)

Edit Block Element

Parameters

BlockElement $object

Return Value

BlockElement|string

at line 128
bool|string deleteMultiple(array $objects)

Delete multiple Block Elements

Parameters

array $objects

Return Value

bool|string

at line 149
array getBlocksByIds(array $ids)

Get multiple blocks by array of ids

Parameters

array $ids

Return Value

array

at line 164
array getAllBlocksForPageBuilder()

Get array of all block elements

Return Value

array

at line 180
array getBlockElementSimple(int $id)

Get block element data for specified id

Parameters

int $id

Return Value

array

Exceptions

NonUniqueResultException

at line 195
array findByEntity(string $entity)

Get all Block elements for specified entity

Parameters

string $entity

Return Value

array

at line 210
array findBlockByLayoutTitle(string $title)

Get all Block elements for specified layout title

Parameters

string $title

Return Value

array

at line 225
array getBlocksForTmce(array $params)

Get all block elements for defined params

Parameters

array $params

Return Value

array

at line 247
array findBlocksByTheme(string|int $theme)

Get all blocks for theme, param can be theme name of theme id

Parameters

string|int $theme

Return Value

array

at line 265
array getEntitiesForBlockElementsExtension(array $ids)

Parameters

array $ids

Return Value

array

at line 287
array getEntityNamesForIds(array $ids)

Parameters

array $ids

Return Value

array

at line 305
array findBlockByLocation(string $location, string $entityName)

Find all block elements for location and entity name

Parameters

string $location
string $entityName

Return Value

array

at line 322
array findAllWithTemplatesAsArray(array|null $blocks = null)

Get all block elements with theme name and template data

Parameters

array|null $blocks

Return Value

array