class BlockTemplateRepository extends EntityRepository

Class BlockTemplateRepository is injected as empire_block_template.repository service. BlockTemplateRepository is used for crud operation for entity.

Use this class to work with database.

Constants

ALIAS

Alias for main entity

THEME_ALIAS

Alias for theme

Methods

array
findAllTemplatesForTheme(string $theme, bool $loadContent = false, null|string $enitityType = null)

Get all templates for specified params

findTemplateByTitle(string $title)

Get single template by title

save(BlockTemplate $entity)

Save BlockTemplate

edit(BlockTemplate $entity)

Merge BlockTemplate

bool
remove(BlockTemplate $entity)

Remove single BlockTemplate

bool|null
removeByTitle(string $title)

Remove templates for specified title

array
getTemplatesForEntity(string $entity)

Get all templates for specified enitity

mixed
getReference(int $id)

Get reference to class

Details

at line 43
array findAllTemplatesForTheme(string $theme, bool $loadContent = false, null|string $enitityType = null)

Get all templates for specified params

Parameters

string $theme
  • Name or id of theme to select
bool $loadContent
  • Defines if query should load html, js and css content
null|string $enitityType
  • Type of entity

Return Value

array

at line 73
BlockTemplate|null findTemplateByTitle(string $title)

Get single template by title

Parameters

string $title

Return Value

BlockTemplate|null

Exceptions

NonUniqueResultException

at line 88
BlockTemplate save(BlockTemplate $entity)

Save BlockTemplate

Parameters

BlockTemplate $entity

Return Value

BlockTemplate

at line 106
BlockTemplate edit(BlockTemplate $entity)

Merge BlockTemplate

Parameters

BlockTemplate $entity

Return Value

BlockTemplate

at line 124
bool remove(BlockTemplate $entity)

Remove single BlockTemplate

Parameters

BlockTemplate $entity

Return Value

bool

at line 142
bool|null removeByTitle(string $title)

Remove templates for specified title

Parameters

string $title

Return Value

bool|null

at line 166
array getTemplatesForEntity(string $entity)

Get all templates for specified enitity

Parameters

string $entity

Return Value

array

at line 183
mixed getReference(int $id)

Get reference to class

Parameters

int $id

Return Value

mixed

Exceptions

ORMException