Craft Themes (3.x)

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

Properties

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

getAll()

Get all groups

public getAll() : Collection
Return values
Collection

getById()

Get group by id

public getById(int $id) : Group
Parameters
$id : int
Tags
throws
GroupException
Return values
Group

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

matrixService()

Get the matrix service

protected matrixService() : MatrixService
Return values
MatrixService

triggerEvent()

Triggers an event

protected triggerEvent(string $type, Event $event) : mixed
Parameters
$type : string
$event : Event
Return values
mixed

Search results