class Layout extends Plugin (View source)

Defines a Layout annotation object.

Layouts are used to define a list of regions and then output render arrays in each of the regions, usually using a template.

Plugin namespace: Plugin\Layout

Properties

protected array $definition

The plugin definition read from the class annotation.

from  Plugin
string $id

The plugin ID.

string $label

The human-readable name.

string $description

A description for advanced layouts.

string $category

The human-readable category.

string $template

The template file to render this layout (relative to the 'path' given).

string $theme_hook

The theme hook used to render this layout.

string $path

Path (relative to the module or theme) to resources like icon or template.

string $library

The asset library.

string $icon

The path to the preview image (relative to the 'path' given).

string[][] $icon_map

The icon map.

array $regions

An associative array of regions in this layout.

string $default_region

The default region.

string $class

The layout plugin class.

Methods

__construct($values)

Constructs a Plugin object.

from  Plugin
array
parse(array $values)

Parses an annotation into its definition.

from  Plugin
get()

Gets the value of an annotation.

string
getProvider()

Gets the name of the provider of the annotated class.

from  Plugin
setProvider(string $provider)

Sets the name of the provider of the annotated class.

from  Plugin
string
getId()

Gets the unique ID for this annotated class.

from  Plugin
string
getClass()

Gets the class of the annotated class.

from  Plugin
setClass(string $class)

Sets the class of the annotated class.

from  Plugin

Details

__construct($values)

Constructs a Plugin object.

Builds up the plugin definition and invokes the get() method for any classed annotations that were used.

Parameters

$values

protected array parse(array $values)

Parses an annotation into its definition.

Parameters

array $values

The annotation array.

Return Value

array

The parsed annotation as a definition.

get()

Gets the value of an annotation.

string getProvider()

Gets the name of the provider of the annotated class.

Return Value

string

setProvider(string $provider)

Sets the name of the provider of the annotated class.

Parameters

string $provider

The provider of the annotated class.

string getId()

Gets the unique ID for this annotated class.

Return Value

string

string getClass()

Gets the class of the annotated class.

Return Value

string

setClass(string $class)

Sets the class of the annotated class.

Parameters

string $class

The class of the annotated class.