Craft Themes (3.x)

CpBlocksAjaxController extends Controller
in package

Controller for ajax actions related to blocks

Table of Contents

$blockCache  : BlockCacheService
$blockProviders  : BlockProvidersService
$blocks  : BlockService
$displays  : DisplayService
$fieldDisplayers  : FieldDisplayerService
$fields  : FieldsService
$groups  : GroupsService
$layouts  : LayoutService
$registry  : ThemesRegistry
$viewModes  : ViewModeService
actionBlockProviders()  : Response
Get all block providers as json
actionBlocks()  : array<string|int, mixed>
Get all blocks for a layout
actionDeleteLayout()  : array<string|int, mixed>
Delete a layout by id
actionSaveBlocks()  : array<string|int, mixed>
Save blocks
actionValidateBlockOptions()  : array<string|int, mixed>
Validate block options
afterAction()  : mixed
beforeAction()  : mixed
init()  : mixed

Properties

$blockCache

protected BlockCacheService $blockCache

$blockProviders

protected BlockProvidersService $blockProviders

$fieldDisplayers

protected FieldDisplayerService $fieldDisplayers

Methods

actionBlockProviders()

Get all block providers as json

public actionBlockProviders() : Response
Return values
Response

actionBlocks()

Get all blocks for a layout

public actionBlocks(int $layout) : array<string|int, mixed>
Parameters
$layout : int
Return values
array<string|int, mixed>

actionDeleteLayout()

Delete a layout by id

public actionDeleteLayout(int $id) : array<string|int, mixed>
Parameters
$id : int
Return values
array<string|int, mixed>

actionSaveBlocks()

Save blocks

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

actionValidateBlockOptions()

Validate block options

public actionValidateBlockOptions() : 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) : mixed
Parameters
$action : mixed
Tags
inheritDoc
Return values
mixed

init()

public init() : mixed
Tags
inheritDoc
Return values
mixed

Search results