Craft Themes (4.x)

DisplayController extends Controller
in package

Controller for actions related to displays

Table of Contents

EVENT_REGISTER_ASSET_BUNDLES  = 'register_asset_bundles'
$ajaxActions  : mixed
$blockCache  : BlockCacheService
$blockProviders  : BlockProvidersService
$blocks  : BlockService
$displays  : DisplayService
$fieldDisplayers  : FieldDisplayerService
$fields  : FieldsService
$groups  : GroupsService
$layouts  : LayoutService
$registry  : ThemesRegistry
$viewModes  : ViewModeService
actionIndex()  : Response
Display index
actionSave()  : array<string|int, mixed>
Saves view modes
actionValidateFieldOptions()  : array<string|int, mixed>
Validate field options
actionViewModes()  : array<string|int, mixed>
Get view modes for a layout
afterAction()  : mixed
beforeAction()  : bool
init()  : void

Constants

EVENT_REGISTER_ASSET_BUNDLES

public mixed EVENT_REGISTER_ASSET_BUNDLES = 'register_asset_bundles'

Properties

$ajaxActions

protected mixed $ajaxActions = ['validate-field-options', 'view-modes', 'save']

$blockCache

protected BlockCacheService $blockCache

$blockProviders

protected BlockProvidersService $blockProviders

$fieldDisplayers

protected FieldDisplayerService $fieldDisplayers

Methods

actionIndex()

Display index

public actionIndex([string|null $themeName = null ][, int|null $layout = null ][, string $viewModeHandle = '' ]) : Response
Parameters
$themeName : string|null = null
$layout : int|null = null
$viewModeHandle : string = ''
Return values
Response

actionSave()

Saves view modes

public actionSave() : array<string|int, mixed>
Return values
array<string|int, mixed>

actionValidateFieldOptions()

Validate field options

public actionValidateFieldOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

actionViewModes()

Get view modes for a layout

public actionViewModes() : array<string|int, mixed>
Return values
array<string|int, mixed>

afterAction()

public afterAction(mixed $action, mixed $result) : mixed
Parameters
$action : mixed
$result : mixed
Tags
inheritDoc
Return values
mixed

beforeAction()

public beforeAction(mixed $action) : bool
Parameters
$action : mixed
Tags
inheritDoc
Return values
bool

init()

public init() : void
Tags
inheritDoc
Return values
void

Search results