BlockElementsTemplatesManager
class BlockElementsTemplatesManager implements BasicEntityManagerInterface
Class BlockElementsTemplatesManager is injected as empire_block_elements_templates.manager service. BlockElementsTemplatesManager handles the logic for entity.
Properties
| protected BlockTemplateRepository | $repository | ||
| protected BlockElementsEventContainer | $eventContainer |
Methods
No description
No description
BlockTemplateManager constructor.
Save or edit template
Get all templates for specified params
Get single template by title
Save template to file
Edit content of html, css and js files
Get html, css and js content
Prepare template for download
Delete html, css and js templates based on html template path
Get all templates for specified entity
Get reference to class
Dispatch event when template is removed
Details
at line 37
static string
getBaseViewsDir()
at line 45
static string
getViewsDir()
at line 55
__construct(BlockTemplateRepository $repository, BlockElementsEventContainer $eventContainer)
BlockTemplateManager constructor.
at line 67
BlockTemplate
save(BlockTemplate $entity)
Save BlockTemplate
at line 78
BlockTemplate
edit(BlockTemplate $entity)
Merge BlockTemplate
at line 96
BlockTemplate
handleTemplateEdit(string $entity, string $baseName, string $content, string $contentCss, string $contentJs, null $contentScss)
Save or edit template
at line 123
bool
remove(BlockTemplate $entity)
Remove single BlockTemplate
at line 136
array
findAllTemplatesForTheme(string $theme, bool $loadContent = false, null|string $entityType = null)
Get all templates for specified params
at line 149
BlockTemplate|null
findTemplateByTitle(string $title)
Get single template by title
at line 162
array|string
createTemplate(string $name, string $entity)
Save template to file
at line 235
bool
editTemplateContent(string $path, string $content, string $contentScss, string $contentJs)
Edit content of html, css and js files
at line 287
bool|array
getTemplateContent(string $path)
Get html, css and js content
at line 315
bool|string
prepareTemplateForDownload(string $mainPath)
Prepare template for download
at line 346
bool
deleteTemplate(string $path)
Delete html, css and js templates based on html template path
at line 387
array
getTemplatesForEntity(string $entity)
Get all templates for specified entity
at line 400
mixed
getReference(int $id)
Get reference to class
at line 409
Event
dispatchBlockTemplateRemoveEvent()
Dispatch event when template is removed