GroupsService
extends Service
in package
Table of Contents
- CONFIG_KEY = 'themes.groups'
- $_groups : Collection
- create() : GroupInterface
- Create a group from config
- delete() : bool
- Deletes a group
- getAll() : Collection
- Get all groups
- getById() : Group
- Get group by id
- getByUid() : GroupInterface|null
- Get a group by uid
- getForDisplay() : Field|null
- Get a group for a display
- getRecordByUid() : GroupRecord
- Get a group record by uid or a new one if it doesn't exist
- handleChanged() : mixed
- Handles a change in group config
- handleDeleted() : mixed
- Handles a deletion in group config
- populateFromData() : GroupInterface
- Populates a group from an array of data
- rebuildConfig() : mixed
- Respond to rebuild config event
- save() : bool
- Saves a group
- add() : mixed
- Add a group to internal cache
- blockCacheService() : BlockCacheService
- Get the block cache service
- blockProviderService() : BlockProvidersService
- Get the block providers service
- blocksService() : BlockService
- Get the blocks service
- displayService() : DisplayService
- Get the display service
- eagerLoadingService() : EagerLoadingService
- Get the eager loading service
- fieldDisplayersService() : FieldDisplayerService
- Get the field displayers service
- fieldsService() : FieldsService
- Get the fields service
- fileDisplayerService() : FileDisplayerService
- Get the file displayers service
- groupsService() : GroupsService
- Get the groups service
- layoutService() : LayoutService
- Get the layout service
- matrixService() : MatrixService
- Get the matrix service
- themesRegistry() : ThemesRegistry
- Get the themes registry
- triggerEvent() : mixed
- Triggers an event
- viewModesService() : ViewModeService
- Get the view mode service
- viewService() : ViewService
- Get the view service
Constants
CONFIG_KEY
public
mixed
CONFIG_KEY
= 'themes.groups'
Properties
$_groups
private
Collection
$_groups
Methods
create()
Create a group from config
public
create(array<string|int, mixed>|ActiveRecord $config) : GroupInterface
Parameters
- $config : array<string|int, mixed>|ActiveRecord
Return values
GroupInterface —delete()
Deletes a group
public
delete(GroupInterface $group) : bool
Parameters
- $group : GroupInterface
Return values
bool —getAll()
Get all groups
public
getAll() : Collection
Return values
Collection —getById()
Get group by id
public
getById(int $id) : Group
Parameters
- $id : int
Tags
Return values
Group —getByUid()
Get a group by uid
public
getByUid(int $uid) : GroupInterface|null
Parameters
- $uid : int
Return values
GroupInterface|null —getForDisplay()
Get a group for a display
public
getForDisplay(DisplayInterface $display) : Field|null
Parameters
- $display : DisplayInterface
Return values
Field|null —getRecordByUid()
Get a group record by uid or a new one if it doesn't exist
public
getRecordByUid(string $uid) : GroupRecord
Parameters
- $uid : string
Return values
GroupRecord —handleChanged()
Handles a change in group config
public
handleChanged(ConfigEvent $event) : mixed
Parameters
- $event : ConfigEvent
Return values
mixed —handleDeleted()
Handles a deletion in group config
public
handleDeleted(ConfigEvent $event) : mixed
Parameters
- $event : ConfigEvent
Return values
mixed —populateFromData()
Populates a group from an array of data
public
populateFromData(array<string|int, mixed> $data) : GroupInterface
Parameters
- $data : array<string|int, mixed>
Return values
GroupInterface —rebuildConfig()
Respond to rebuild config event
public
rebuildConfig(RebuildConfigEvent $e) : mixed
Parameters
- $e : RebuildConfigEvent
Return values
mixed —save()
Saves a group
public
save(GroupInterface $group[, bool $validate = true ]) : bool
Parameters
- $group : GroupInterface
- $validate : bool = true
Return values
bool —add()
Add a group to internal cache
protected
add(GroupInterface $group) : mixed
Parameters
- $group : GroupInterface
Return values
mixed —blockCacheService()
Get the block cache service
protected
blockCacheService() : BlockCacheService
Return values
BlockCacheService —blockProviderService()
Get the block providers service
protected
blockProviderService() : BlockProvidersService
Return values
BlockProvidersService —blocksService()
Get the blocks service
protected
blocksService() : BlockService
Return values
BlockService —displayService()
Get the display service
protected
displayService() : DisplayService
Return values
DisplayService —eagerLoadingService()
Get the eager loading service
protected
eagerLoadingService() : EagerLoadingService
Return values
EagerLoadingService —fieldDisplayersService()
Get the field displayers service
protected
fieldDisplayersService() : FieldDisplayerService
Return values
FieldDisplayerService —fieldsService()
Get the fields service
protected
fieldsService() : FieldsService
Return values
FieldsService —fileDisplayerService()
Get the file displayers service
protected
fileDisplayerService() : FileDisplayerService
Return values
FileDisplayerService —groupsService()
Get the groups service
protected
groupsService() : GroupsService
Return values
GroupsService —layoutService()
Get the layout service
protected
layoutService() : LayoutService
Return values
LayoutService —matrixService()
Get the matrix service
protected
matrixService() : MatrixService
Return values
MatrixService —themesRegistry()
Get the themes registry
protected
themesRegistry() : ThemesRegistry
Return values
ThemesRegistry —triggerEvent()
Triggers an event
protected
triggerEvent(string $type, Event $event) : mixed
Parameters
- $type : string
- $event : Event
Return values
mixed —viewModesService()
Get the view mode service
protected
viewModesService() : ViewModeService
Return values
ViewModeService —viewService()
Get the view service
protected
viewService() : ViewService