BlockTemplateRepository
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
BlockTemplate|null
findTemplateByTitle(string $title)
Get single template by title
bool
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
at line 73
BlockTemplate|null
findTemplateByTitle(string $title)
Get single template by title
at line 88
BlockTemplate
save(BlockTemplate $entity)
Save BlockTemplate
at line 106
BlockTemplate
edit(BlockTemplate $entity)
Merge BlockTemplate
at line 124
bool
remove(BlockTemplate $entity)
Remove single BlockTemplate
at line 142
bool|null
removeByTitle(string $title)
Remove templates for specified title
at line 166
array
getTemplatesForEntity(string $entity)
Get all templates for specified enitity
at line 183
mixed
getReference(int $id)
Get reference to class