content => string (66) "CounsellingBC: Psychologists, Counsellors and Therapists Directory"
$0['metatag'][0]['attributes']['content']
1 => array (2)
$0['metatag'][1]
tag => string (4) "meta"
$0['metatag'][1]['tag']
attributes => array (2)
$0['metatag'][1]['attributes']
name => string (11) "description"
$0['metatag'][1]['attributes']['name']
content => string (197) "Vancouver: Counselling and psychologist resources throughout B.C. plus a dir...
$0['metatag'][1]['attributes']['content']
Vancouver: Counselling and psychologist resources throughout B.C. plus a directory including Registered Psychologists, Registered Clincial Counsellors, Art Therapists and Registered Social Workers.
value => string (353) "<h2>Our Mission:</h2><p class="u-fs-lg">At Vancouver based CounsellingBC, ou...
$0['body'][0]['value']
<h2>Our Mission:</h2><p class="u-fs-lg">At Vancouver based CounsellingBC, our mission is to provide you with the best online information resource in British Columbia regarding counselling, psychological services, art therapy and psychotherapy.<br> </p><h4>Click on any of the links below to find a counsellor by their professional designation:</h4>
summary => string (0) ""
$0['body'][0]['summary']
format => string (9) "full_html"
$0['body'][0]['format']
field_hero_image => array (1)
$0['field_hero_image']
0 => array (7)
$0['field_hero_image'][0]
target_id => string (4) "8905"
$0['field_hero_image'][0]['target_id']
alt => string (87) "Photo of a counsellor looking attentively at a client who is just outside of...
$0['field_hero_image'][0]['alt']
Photo of a counsellor looking attentively at a client who is just outside of the frame.
Vancouver: Counselling and psychologist resources throughout B.C. plus a directory including Registered Psychologists, Registered Clincial Counsellors, Art Therapists and Registered Social Workers.
title => string (66) "CounsellingBC: Psychologists, Counsellors and Therapists Directory"
{"description":"Vancouver: Counselling and psychologist resources throughout B.C. plus a directory including Registered Psychologists, Registered Clincial Counsellors, Art Therapists and Registered Social Workers.","title":"CounsellingBC: Psychologists, Counsellors and Therapists Directory"}
public __construct($uuid, $region, array $configuration = array(), array $additional = array(), array $third_party_settings = array()) Constructs a new SectionComponent.
/**
* Constructs a new SectionComponent.
*
* @param string $uuid
* The UUID.
* @param string $region
* The region.
* @param mixed[] $configuration
* The plugin configuration.
* @param mixed[] $additional
* (optional) Additional values.
* @param array[] $third_party_settings
* (optional) Any third party settings.
*
* @todo Remove $additional argument in
* https://www.drupal.org/project/drupal/issues/3160644 in drupal:12.0.x.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:90
public toRenderArray(array $contexts = array(), $in_preview = false): array Returns the renderable array for this component.
/**
* Returns the renderable array for this component.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of available contexts.
* @param bool $in_preview
* TRUE if the component is being previewed, FALSE otherwise.
*
* @return array
* A renderable array representing the content of the component.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:115
public get($property): mixed Gets any arbitrary property for the component.
/**
* Gets any arbitrary property for the component.
*
* @param string $property
* The property to retrieve.
*
* @deprecated in drupal:11.3.0 and is removed from drupal:12.0.0.
* Additional properties should be gotten via ::getThirdPartySetting().
*
* @see https://www.drupal.org/node/3100177
*
* @return mixed
* The value for that property, or NULL if the property does not exist.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:137
public set($property, $value): $this Sets a value to an arbitrary property for the component.
/**
* Sets a value to an arbitrary property for the component.
*
* @param string $property
* The property to use for the value.
* @param mixed $value
* The value to set.
*
* @deprecated in drupal:11.4.0 and is removed from drupal:12.0.0.
* Additional properties should be set via ::setThirdPartySetting().
*
* @see https://www.drupal.org/node/3100177
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:163
public getRegion(): string Gets the region for the component.
/**
* Gets the region for the component.
*
* @return string
* The region.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:180
public setRegion($region): $this Sets the region for the component.
/**
* Sets the region for the component.
*
* @param string $region
* The region.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:192
public getWeight(): int Gets the weight of the component.
/**
* Gets the weight of the component.
*
* @return int
* The zero-based weight of the component.
*
* @throws \UnexpectedValueException
* Thrown if the weight was never set.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:206
public setWeight($weight): $this Sets the weight of the component.
/**
* Sets the weight of the component.
*
* @param int $weight
* The zero-based weight of the component.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:218
public getConfiguration(): mixed[] Gets the component plugin configuration.
/**
* Gets the component plugin configuration.
*
* @return mixed[]
* The component plugin configuration.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:229
public setConfiguration(array $configuration): $this Sets the plugin configuration.
/**
* Sets the plugin configuration.
*
* @param mixed[] $configuration
* The plugin configuration.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:241
public getPluginId(): string Gets the plugin ID.
/**
* Gets the plugin ID.
*
* @return string
* The plugin ID.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:252
public getUuid(): string Gets the UUID for this component.
/**
* Gets the UUID for this component.
*
* @return string
* The UUID.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:266
public getPlugin(array $contexts = array()): \Drupal\Component\Plugin\PluginInspectionInterface Gets the plugin for this component.
/**
* Gets the plugin for this component.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of contexts to set on the plugin.
*
* @return \Drupal\Component\Plugin\PluginInspectionInterface
* The plugin.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:279
protected pluginManager(): \Drupal\Core\Block\BlockManagerInterface Wraps the component plugin manager.
/**
* Wraps the component plugin manager.
*
* @return \Drupal\Core\Block\BlockManagerInterface
* The plugin manager.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:293
protected contextHandler(): \Drupal\Core\Plugin\Context\ContextHandlerInterface Wraps the context handler.
/**
* Wraps the context handler.
*
* @return \Drupal\Core\Plugin\Context\ContextHandlerInterface
* The context handler.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:305
protected eventDispatcher(): \Symfony\Contracts\EventDispatcher\EventDispatcherInterface Wraps the event dispatcher.
/**
* Wraps the event dispatcher.
*
* @return \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* The event dispatcher.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:315
public toArray(): array Returns an array representation of the section component.
/**
* Returns an array representation of the section component.
*
* Only use this method if you are implementing custom storage for sections.
*
* @return array
* An array representation of the section component.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:327
public getThirdPartySetting($provider, $key, $default = null) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:377
public getThirdPartySettings($provider) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:384
public setThirdPartySetting($provider, $key, $value) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:391
public unsetThirdPartySetting($provider, $key) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:399
public getThirdPartyProviders(): array Gets the list of third parties that store information.
/**
* Gets the list of third parties that store information.
*
* @return array
* The list of third parties.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:415
public static Drupal\layout_builder\SectionComponent::fromArray(array $component): static Creates an object from an array representation of the section component.
/**
* Creates an object from an array representation of the section component.
*
* Only use this method if you are implementing custom storage for sections.
*
* @param array $component
* An array of section component data in the format returned by ::toArray().
*
* @return static
* The section component object.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:352
label => UTF-8 string (37) "Maybe you’ve been putting this off."
label_display => string (7) "visible"
provider => string (14) "layout_builder"
view_mode => string (4) "full"
block_id => string (2) "32"
block_revision_id => string (2) "43"
block_serialized => null
context_mapping => array (0)
protected weight -> integer 1
protected additional -> array (1)
bootstrap_styles => array (1) Depth Limit
protected thirdPartySettings -> array (0)
public __construct($uuid, $region, array $configuration = array(), array $additional = array(), array $third_party_settings = array()) Constructs a new SectionComponent.
/**
* Constructs a new SectionComponent.
*
* @param string $uuid
* The UUID.
* @param string $region
* The region.
* @param mixed[] $configuration
* The plugin configuration.
* @param mixed[] $additional
* (optional) Additional values.
* @param array[] $third_party_settings
* (optional) Any third party settings.
*
* @todo Remove $additional argument in
* https://www.drupal.org/project/drupal/issues/3160644 in drupal:12.0.x.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:90
public toRenderArray(array $contexts = array(), $in_preview = false): array Returns the renderable array for this component.
/**
* Returns the renderable array for this component.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of available contexts.
* @param bool $in_preview
* TRUE if the component is being previewed, FALSE otherwise.
*
* @return array
* A renderable array representing the content of the component.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:115
public get($property): mixed Gets any arbitrary property for the component.
/**
* Gets any arbitrary property for the component.
*
* @param string $property
* The property to retrieve.
*
* @deprecated in drupal:11.3.0 and is removed from drupal:12.0.0.
* Additional properties should be gotten via ::getThirdPartySetting().
*
* @see https://www.drupal.org/node/3100177
*
* @return mixed
* The value for that property, or NULL if the property does not exist.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:137
public set($property, $value): $this Sets a value to an arbitrary property for the component.
/**
* Sets a value to an arbitrary property for the component.
*
* @param string $property
* The property to use for the value.
* @param mixed $value
* The value to set.
*
* @deprecated in drupal:11.4.0 and is removed from drupal:12.0.0.
* Additional properties should be set via ::setThirdPartySetting().
*
* @see https://www.drupal.org/node/3100177
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:163
public getRegion(): string Gets the region for the component.
/**
* Gets the region for the component.
*
* @return string
* The region.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:180
public setRegion($region): $this Sets the region for the component.
/**
* Sets the region for the component.
*
* @param string $region
* The region.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:192
public getWeight(): int Gets the weight of the component.
/**
* Gets the weight of the component.
*
* @return int
* The zero-based weight of the component.
*
* @throws \UnexpectedValueException
* Thrown if the weight was never set.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:206
public setWeight($weight): $this Sets the weight of the component.
/**
* Sets the weight of the component.
*
* @param int $weight
* The zero-based weight of the component.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:218
public getConfiguration(): mixed[] Gets the component plugin configuration.
/**
* Gets the component plugin configuration.
*
* @return mixed[]
* The component plugin configuration.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:229
public setConfiguration(array $configuration): $this Sets the plugin configuration.
/**
* Sets the plugin configuration.
*
* @param mixed[] $configuration
* The plugin configuration.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:241
public getPluginId(): string Gets the plugin ID.
/**
* Gets the plugin ID.
*
* @return string
* The plugin ID.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:252
public getUuid(): string Gets the UUID for this component.
/**
* Gets the UUID for this component.
*
* @return string
* The UUID.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:266
public getPlugin(array $contexts = array()): \Drupal\Component\Plugin\PluginInspectionInterface Gets the plugin for this component.
/**
* Gets the plugin for this component.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of contexts to set on the plugin.
*
* @return \Drupal\Component\Plugin\PluginInspectionInterface
* The plugin.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:279
protected pluginManager(): \Drupal\Core\Block\BlockManagerInterface Wraps the component plugin manager.
/**
* Wraps the component plugin manager.
*
* @return \Drupal\Core\Block\BlockManagerInterface
* The plugin manager.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:293
protected contextHandler(): \Drupal\Core\Plugin\Context\ContextHandlerInterface Wraps the context handler.
/**
* Wraps the context handler.
*
* @return \Drupal\Core\Plugin\Context\ContextHandlerInterface
* The context handler.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:305
protected eventDispatcher(): \Symfony\Contracts\EventDispatcher\EventDispatcherInterface Wraps the event dispatcher.
/**
* Wraps the event dispatcher.
*
* @return \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* The event dispatcher.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:315
public toArray(): array Returns an array representation of the section component.
/**
* Returns an array representation of the section component.
*
* Only use this method if you are implementing custom storage for sections.
*
* @return array
* An array representation of the section component.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:327
public getThirdPartySetting($provider, $key, $default = null) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:377
public getThirdPartySettings($provider) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:384
public setThirdPartySetting($provider, $key, $value) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:391
public unsetThirdPartySetting($provider, $key) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:399
public getThirdPartyProviders(): array Gets the list of third parties that store information.
/**
* Gets the list of third parties that store information.
*
* @return array
* The list of third parties.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:415
public static Drupal\layout_builder\SectionComponent::fromArray(array $component): static Creates an object from an array representation of the section component.
/**
* Creates an object from an array representation of the section component.
*
* Only use this method if you are implementing custom storage for sections.
*
* @param array $component
* An array of section component data in the format returned by ::toArray().
*
* @return static
* The section component object.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:352
protected thirdPartySettings -> array (0)
public __construct($layout_id, array $layout_settings = array(), array $components = array(), array $third_party_settings = array()) Constructs a new Section.
new \Drupal\layout_builder\Section()
/**
* Constructs a new Section.
*
* @param string $layout_id
* The layout plugin ID.
* @param array $layout_settings
* (optional) The layout plugin settings.
* @param \Drupal\layout_builder\SectionComponent[] $components
* (optional) The components.
* @param array[] $third_party_settings
* (optional) Any third party settings.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:65
public toRenderArray(array $contexts = array(), $in_preview = false): array Returns the renderable array for this section.
/**
* Returns the renderable array for this section.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of available contexts.
* @param bool $in_preview
* TRUE if the section is being previewed, FALSE otherwise.
*
* @return array
* A renderable array representing the content of the section.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:85
public getLayout(array $contexts = array()): \Drupal\Core\Layout\LayoutInterface Gets the layout plugin for this section.
/**
* Gets the layout plugin for this section.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of available contexts.
*
* @return \Drupal\Core\Layout\LayoutInterface
* The layout plugin.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:115
public getLayoutId(): string Gets the layout plugin ID for this section.
/**
* Gets the layout plugin ID for this section.
*
* @return string
* The layout plugin ID.
*
* @internal
* This method should only be used by code responsible for storing the data.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:132
public getLayoutSettings(): mixed[] Gets the layout plugin settings for this section.
/**
* Gets the layout plugin settings for this section.
*
* @return mixed[]
* The layout plugin settings.
*
* @internal
* This method should only be used by code responsible for storing the data.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:145
public setLayoutSettings(array $layout_settings): $this Sets the layout plugin settings for this section.
/**
* Sets the layout plugin settings for this section.
*
* @param mixed[] $layout_settings
* The layout plugin settings.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:157
public getDefaultRegion(): string Gets the default region.
/**
* Gets the default region.
*
* @return string
* The machine-readable name of the default region.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:168
public getComponents(): \Drupal\layout_builder\SectionComponent[] Returns the components of the section.
/**
* Returns the components of the section.
*
* @return \Drupal\layout_builder\SectionComponent[]
* An array of components, keyed by the component UUID.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:178
public getComponent($uuid): \Drupal\layout_builder\SectionComponent Gets the component for a given UUID.
/**
* Gets the component for a given UUID.
*
* @param string $uuid
* The UUID of the component to retrieve.
*
* @return \Drupal\layout_builder\SectionComponent
* The component.
*
* @throws \InvalidArgumentException
* Thrown when the expected UUID does not exist.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:194
protected setComponent(Drupal\layout_builder\SectionComponent $component): $this Helper method to set a component.
/**
* Helper method to set a component.
*
* @param \Drupal\layout_builder\SectionComponent $component
* The component.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:210
public removeComponent($uuid): $this Removes a given component from a region.
/**
* Removes a given component from a region.
*
* @param string $uuid
* The UUID of the component to remove.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:223
public appendComponent(Drupal\layout_builder\SectionComponent $component): $this Appends a component to the end of a region.
/**
* Appends a component to the end of a region.
*
* @param \Drupal\layout_builder\SectionComponent $component
* The component being appended.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:236
protected getNextHighestWeight($region): int Returns the next highest weight of the component in a region.
/**
* Returns the next highest weight of the component in a region.
*
* @param string $region
* The region name.
*
* @return int
* A number higher than the highest weight of the component in the region.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:251
public getComponentsByRegion($region): \Drupal\layout_builder\SectionComponent[] Gets the components for a specific region.
/**
* Gets the components for a specific region.
*
* @param string $region
* The region name.
*
* @return \Drupal\layout_builder\SectionComponent[]
* An array of components in the specified region, sorted by weight.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:268
public insertAfterComponent($preceding_uuid, Drupal\layout_builder\SectionComponent $component): $this Inserts a component after a specified existing component.
/**
* Inserts a component after a specified existing component.
*
* @param string $preceding_uuid
* The UUID of the existing component to insert after.
* @param \Drupal\layout_builder\SectionComponent $component
* The component being inserted.
*
* @return $this
*
* @throws \InvalidArgumentException
* Thrown when the expected UUID does not exist.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:291
public insertComponent($delta, Drupal\layout_builder\SectionComponent $new_component): $this Inserts a component at a specified delta.
/**
* Inserts a component at a specified delta.
*
* @param int $delta
* The zero-based delta in which to insert the component.
* @param \Drupal\layout_builder\SectionComponent $new_component
* The component being inserted.
*
* @return $this
*
* @throws \OutOfBoundsException
* Thrown when the specified delta is invalid.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:314
protected layoutPluginManager(): \Drupal\Core\Layout\LayoutPluginManagerInterface Wraps the layout plugin manager.
/**
* Wraps the layout plugin manager.
*
* @return \Drupal\Core\Layout\LayoutPluginManagerInterface
* The layout plugin manager.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:343
public toArray(): array Returns an array representation of the section.
/**
* Returns an array representation of the section.
*
* Only use this method if you are implementing custom storage for sections.
*
* @return array
* An array representation of the section component.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:355
public __clone() Magic method: Implements a deep clone.
clone $0['layout_builder__layout'][0]['section']
/**
* Magic method: Implements a deep clone.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:396
public getThirdPartySetting($provider, $key, $default = null) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:440
protected contextHandler(): \Drupal\Core\Plugin\Context\ContextHandlerInterface Wraps the context handler.
/**
* Wraps the context handler.
*
* @return \Drupal\Core\Plugin\Context\ContextHandlerInterface
* The context handler.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:450
public static Drupal\layout_builder\Section::fromArray(array $section): static Creates an object from an array representation of the section.
/**
* Creates an object from an array representation of the section.
*
* Only use this method if you are implementing custom storage for sections.
*
* @param array $section
* An array of section data in the format returned by ::toArray().
*
* @return static
* The section object.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:377
label => string (56) "Not sure where to start? Begin with what feels familiar."
label_display => string (7) "visible"
provider => string (14) "layout_builder"
view_mode => string (4) "full"
block_id => string (2) "33"
block_revision_id => string (2) "44"
block_serialized => null
context_mapping => array (0)
protected weight -> integer 0
protected additional -> array (1)
bootstrap_styles => array (1) Depth Limit
protected thirdPartySettings -> array (0)
public __construct($uuid, $region, array $configuration = array(), array $additional = array(), array $third_party_settings = array()) Constructs a new SectionComponent.
/**
* Constructs a new SectionComponent.
*
* @param string $uuid
* The UUID.
* @param string $region
* The region.
* @param mixed[] $configuration
* The plugin configuration.
* @param mixed[] $additional
* (optional) Additional values.
* @param array[] $third_party_settings
* (optional) Any third party settings.
*
* @todo Remove $additional argument in
* https://www.drupal.org/project/drupal/issues/3160644 in drupal:12.0.x.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:90
public toRenderArray(array $contexts = array(), $in_preview = false): array Returns the renderable array for this component.
/**
* Returns the renderable array for this component.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of available contexts.
* @param bool $in_preview
* TRUE if the component is being previewed, FALSE otherwise.
*
* @return array
* A renderable array representing the content of the component.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:115
public get($property): mixed Gets any arbitrary property for the component.
/**
* Gets any arbitrary property for the component.
*
* @param string $property
* The property to retrieve.
*
* @deprecated in drupal:11.3.0 and is removed from drupal:12.0.0.
* Additional properties should be gotten via ::getThirdPartySetting().
*
* @see https://www.drupal.org/node/3100177
*
* @return mixed
* The value for that property, or NULL if the property does not exist.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:137
public set($property, $value): $this Sets a value to an arbitrary property for the component.
/**
* Sets a value to an arbitrary property for the component.
*
* @param string $property
* The property to use for the value.
* @param mixed $value
* The value to set.
*
* @deprecated in drupal:11.4.0 and is removed from drupal:12.0.0.
* Additional properties should be set via ::setThirdPartySetting().
*
* @see https://www.drupal.org/node/3100177
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:163
public getRegion(): string Gets the region for the component.
/**
* Gets the region for the component.
*
* @return string
* The region.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:180
public setRegion($region): $this Sets the region for the component.
/**
* Sets the region for the component.
*
* @param string $region
* The region.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:192
public getWeight(): int Gets the weight of the component.
/**
* Gets the weight of the component.
*
* @return int
* The zero-based weight of the component.
*
* @throws \UnexpectedValueException
* Thrown if the weight was never set.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:206
public setWeight($weight): $this Sets the weight of the component.
/**
* Sets the weight of the component.
*
* @param int $weight
* The zero-based weight of the component.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:218
public getConfiguration(): mixed[] Gets the component plugin configuration.
/**
* Gets the component plugin configuration.
*
* @return mixed[]
* The component plugin configuration.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:229
public setConfiguration(array $configuration): $this Sets the plugin configuration.
/**
* Sets the plugin configuration.
*
* @param mixed[] $configuration
* The plugin configuration.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:241
public getPluginId(): string Gets the plugin ID.
/**
* Gets the plugin ID.
*
* @return string
* The plugin ID.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:252
public getUuid(): string Gets the UUID for this component.
/**
* Gets the UUID for this component.
*
* @return string
* The UUID.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:266
public getPlugin(array $contexts = array()): \Drupal\Component\Plugin\PluginInspectionInterface Gets the plugin for this component.
/**
* Gets the plugin for this component.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of contexts to set on the plugin.
*
* @return \Drupal\Component\Plugin\PluginInspectionInterface
* The plugin.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:279
protected pluginManager(): \Drupal\Core\Block\BlockManagerInterface Wraps the component plugin manager.
/**
* Wraps the component plugin manager.
*
* @return \Drupal\Core\Block\BlockManagerInterface
* The plugin manager.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:293
protected contextHandler(): \Drupal\Core\Plugin\Context\ContextHandlerInterface Wraps the context handler.
/**
* Wraps the context handler.
*
* @return \Drupal\Core\Plugin\Context\ContextHandlerInterface
* The context handler.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:305
protected eventDispatcher(): \Symfony\Contracts\EventDispatcher\EventDispatcherInterface Wraps the event dispatcher.
/**
* Wraps the event dispatcher.
*
* @return \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* The event dispatcher.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:315
public toArray(): array Returns an array representation of the section component.
/**
* Returns an array representation of the section component.
*
* Only use this method if you are implementing custom storage for sections.
*
* @return array
* An array representation of the section component.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:327
public getThirdPartySetting($provider, $key, $default = null) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:377
public getThirdPartySettings($provider) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:384
public setThirdPartySetting($provider, $key, $value) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:391
public unsetThirdPartySetting($provider, $key) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:399
public getThirdPartyProviders(): array Gets the list of third parties that store information.
/**
* Gets the list of third parties that store information.
*
* @return array
* The list of third parties.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:415
public static Drupal\layout_builder\SectionComponent::fromArray(array $component): static Creates an object from an array representation of the section component.
/**
* Creates an object from an array representation of the section component.
*
* Only use this method if you are implementing custom storage for sections.
*
* @param array $component
* An array of section component data in the format returned by ::toArray().
*
* @return static
* The section component object.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:352
public __construct($uuid, $region, array $configuration = array(), array $additional = array(), array $third_party_settings = array()) Constructs a new SectionComponent.
/**
* Constructs a new SectionComponent.
*
* @param string $uuid
* The UUID.
* @param string $region
* The region.
* @param mixed[] $configuration
* The plugin configuration.
* @param mixed[] $additional
* (optional) Additional values.
* @param array[] $third_party_settings
* (optional) Any third party settings.
*
* @todo Remove $additional argument in
* https://www.drupal.org/project/drupal/issues/3160644 in drupal:12.0.x.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:90
public toRenderArray(array $contexts = array(), $in_preview = false): array Returns the renderable array for this component.
/**
* Returns the renderable array for this component.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of available contexts.
* @param bool $in_preview
* TRUE if the component is being previewed, FALSE otherwise.
*
* @return array
* A renderable array representing the content of the component.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:115
public get($property): mixed Gets any arbitrary property for the component.
/**
* Gets any arbitrary property for the component.
*
* @param string $property
* The property to retrieve.
*
* @deprecated in drupal:11.3.0 and is removed from drupal:12.0.0.
* Additional properties should be gotten via ::getThirdPartySetting().
*
* @see https://www.drupal.org/node/3100177
*
* @return mixed
* The value for that property, or NULL if the property does not exist.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:137
public set($property, $value): $this Sets a value to an arbitrary property for the component.
/**
* Sets a value to an arbitrary property for the component.
*
* @param string $property
* The property to use for the value.
* @param mixed $value
* The value to set.
*
* @deprecated in drupal:11.4.0 and is removed from drupal:12.0.0.
* Additional properties should be set via ::setThirdPartySetting().
*
* @see https://www.drupal.org/node/3100177
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:163
public getRegion(): string Gets the region for the component.
/**
* Gets the region for the component.
*
* @return string
* The region.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:180
public setRegion($region): $this Sets the region for the component.
/**
* Sets the region for the component.
*
* @param string $region
* The region.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:192
public getWeight(): int Gets the weight of the component.
/**
* Gets the weight of the component.
*
* @return int
* The zero-based weight of the component.
*
* @throws \UnexpectedValueException
* Thrown if the weight was never set.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:206
public setWeight($weight): $this Sets the weight of the component.
/**
* Sets the weight of the component.
*
* @param int $weight
* The zero-based weight of the component.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:218
public getConfiguration(): mixed[] Gets the component plugin configuration.
/**
* Gets the component plugin configuration.
*
* @return mixed[]
* The component plugin configuration.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:229
public setConfiguration(array $configuration): $this Sets the plugin configuration.
/**
* Sets the plugin configuration.
*
* @param mixed[] $configuration
* The plugin configuration.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:241
public getPluginId(): string Gets the plugin ID.
/**
* Gets the plugin ID.
*
* @return string
* The plugin ID.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:252
public getUuid(): string Gets the UUID for this component.
/**
* Gets the UUID for this component.
*
* @return string
* The UUID.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:266
public getPlugin(array $contexts = array()): \Drupal\Component\Plugin\PluginInspectionInterface Gets the plugin for this component.
/**
* Gets the plugin for this component.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of contexts to set on the plugin.
*
* @return \Drupal\Component\Plugin\PluginInspectionInterface
* The plugin.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:279
protected pluginManager(): \Drupal\Core\Block\BlockManagerInterface Wraps the component plugin manager.
/**
* Wraps the component plugin manager.
*
* @return \Drupal\Core\Block\BlockManagerInterface
* The plugin manager.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:293
protected contextHandler(): \Drupal\Core\Plugin\Context\ContextHandlerInterface Wraps the context handler.
/**
* Wraps the context handler.
*
* @return \Drupal\Core\Plugin\Context\ContextHandlerInterface
* The context handler.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:305
protected eventDispatcher(): \Symfony\Contracts\EventDispatcher\EventDispatcherInterface Wraps the event dispatcher.
/**
* Wraps the event dispatcher.
*
* @return \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* The event dispatcher.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:315
public toArray(): array Returns an array representation of the section component.
/**
* Returns an array representation of the section component.
*
* Only use this method if you are implementing custom storage for sections.
*
* @return array
* An array representation of the section component.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:327
public getThirdPartySetting($provider, $key, $default = null) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:377
public getThirdPartySettings($provider) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:384
public setThirdPartySetting($provider, $key, $value) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:391
public unsetThirdPartySetting($provider, $key) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:399
public getThirdPartyProviders(): array Gets the list of third parties that store information.
/**
* Gets the list of third parties that store information.
*
* @return array
* The list of third parties.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:415
public static Drupal\layout_builder\SectionComponent::fromArray(array $component): static Creates an object from an array representation of the section component.
/**
* Creates an object from an array representation of the section component.
*
* Only use this method if you are implementing custom storage for sections.
*
* @param array $component
* An array of section component data in the format returned by ::toArray().
*
* @return static
* The section component object.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:352
protected thirdPartySettings -> array (0)
public __construct($layout_id, array $layout_settings = array(), array $components = array(), array $third_party_settings = array()) Constructs a new Section.
new \Drupal\layout_builder\Section()
/**
* Constructs a new Section.
*
* @param string $layout_id
* The layout plugin ID.
* @param array $layout_settings
* (optional) The layout plugin settings.
* @param \Drupal\layout_builder\SectionComponent[] $components
* (optional) The components.
* @param array[] $third_party_settings
* (optional) Any third party settings.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:65
public toRenderArray(array $contexts = array(), $in_preview = false): array Returns the renderable array for this section.
/**
* Returns the renderable array for this section.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of available contexts.
* @param bool $in_preview
* TRUE if the section is being previewed, FALSE otherwise.
*
* @return array
* A renderable array representing the content of the section.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:85
public getLayout(array $contexts = array()): \Drupal\Core\Layout\LayoutInterface Gets the layout plugin for this section.
/**
* Gets the layout plugin for this section.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of available contexts.
*
* @return \Drupal\Core\Layout\LayoutInterface
* The layout plugin.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:115
public getLayoutId(): string Gets the layout plugin ID for this section.
/**
* Gets the layout plugin ID for this section.
*
* @return string
* The layout plugin ID.
*
* @internal
* This method should only be used by code responsible for storing the data.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:132
public getLayoutSettings(): mixed[] Gets the layout plugin settings for this section.
/**
* Gets the layout plugin settings for this section.
*
* @return mixed[]
* The layout plugin settings.
*
* @internal
* This method should only be used by code responsible for storing the data.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:145
public setLayoutSettings(array $layout_settings): $this Sets the layout plugin settings for this section.
/**
* Sets the layout plugin settings for this section.
*
* @param mixed[] $layout_settings
* The layout plugin settings.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:157
public getDefaultRegion(): string Gets the default region.
/**
* Gets the default region.
*
* @return string
* The machine-readable name of the default region.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:168
public getComponents(): \Drupal\layout_builder\SectionComponent[] Returns the components of the section.
/**
* Returns the components of the section.
*
* @return \Drupal\layout_builder\SectionComponent[]
* An array of components, keyed by the component UUID.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:178
public getComponent($uuid): \Drupal\layout_builder\SectionComponent Gets the component for a given UUID.
/**
* Gets the component for a given UUID.
*
* @param string $uuid
* The UUID of the component to retrieve.
*
* @return \Drupal\layout_builder\SectionComponent
* The component.
*
* @throws \InvalidArgumentException
* Thrown when the expected UUID does not exist.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:194
protected setComponent(Drupal\layout_builder\SectionComponent $component): $this Helper method to set a component.
/**
* Helper method to set a component.
*
* @param \Drupal\layout_builder\SectionComponent $component
* The component.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:210
public removeComponent($uuid): $this Removes a given component from a region.
/**
* Removes a given component from a region.
*
* @param string $uuid
* The UUID of the component to remove.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:223
public appendComponent(Drupal\layout_builder\SectionComponent $component): $this Appends a component to the end of a region.
/**
* Appends a component to the end of a region.
*
* @param \Drupal\layout_builder\SectionComponent $component
* The component being appended.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:236
protected getNextHighestWeight($region): int Returns the next highest weight of the component in a region.
/**
* Returns the next highest weight of the component in a region.
*
* @param string $region
* The region name.
*
* @return int
* A number higher than the highest weight of the component in the region.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:251
public getComponentsByRegion($region): \Drupal\layout_builder\SectionComponent[] Gets the components for a specific region.
/**
* Gets the components for a specific region.
*
* @param string $region
* The region name.
*
* @return \Drupal\layout_builder\SectionComponent[]
* An array of components in the specified region, sorted by weight.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:268
public insertAfterComponent($preceding_uuid, Drupal\layout_builder\SectionComponent $component): $this Inserts a component after a specified existing component.
/**
* Inserts a component after a specified existing component.
*
* @param string $preceding_uuid
* The UUID of the existing component to insert after.
* @param \Drupal\layout_builder\SectionComponent $component
* The component being inserted.
*
* @return $this
*
* @throws \InvalidArgumentException
* Thrown when the expected UUID does not exist.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:291
public insertComponent($delta, Drupal\layout_builder\SectionComponent $new_component): $this Inserts a component at a specified delta.
/**
* Inserts a component at a specified delta.
*
* @param int $delta
* The zero-based delta in which to insert the component.
* @param \Drupal\layout_builder\SectionComponent $new_component
* The component being inserted.
*
* @return $this
*
* @throws \OutOfBoundsException
* Thrown when the specified delta is invalid.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:314
protected layoutPluginManager(): \Drupal\Core\Layout\LayoutPluginManagerInterface Wraps the layout plugin manager.
/**
* Wraps the layout plugin manager.
*
* @return \Drupal\Core\Layout\LayoutPluginManagerInterface
* The layout plugin manager.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:343
public toArray(): array Returns an array representation of the section.
/**
* Returns an array representation of the section.
*
* Only use this method if you are implementing custom storage for sections.
*
* @return array
* An array representation of the section component.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:355
public __clone() Magic method: Implements a deep clone.
clone $0['layout_builder__layout'][1]['section']
/**
* Magic method: Implements a deep clone.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:396
public getThirdPartySetting($provider, $key, $default = null) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:440
protected contextHandler(): \Drupal\Core\Plugin\Context\ContextHandlerInterface Wraps the context handler.
/**
* Wraps the context handler.
*
* @return \Drupal\Core\Plugin\Context\ContextHandlerInterface
* The context handler.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:450
public static Drupal\layout_builder\Section::fromArray(array $section): static Creates an object from an array representation of the section.
/**
* Creates an object from an array representation of the section.
*
* Only use this method if you are implementing custom storage for sections.
*
* @param array $section
* An array of section data in the format returned by ::toArray().
*
* @return static
* The section object.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:377
label => string (34) "Starting is simpler than you think"
label_display => string (7) "visible"
provider => string (14) "layout_builder"
view_mode => string (4) "full"
block_id => string (2) "35"
block_revision_id => string (2) "46"
block_serialized => null
context_mapping => array (0)
protected weight -> integer 0
protected additional -> array (1)
bootstrap_styles => array (1) Depth Limit
protected thirdPartySettings -> array (0)
public __construct($uuid, $region, array $configuration = array(), array $additional = array(), array $third_party_settings = array()) Constructs a new SectionComponent.
/**
* Constructs a new SectionComponent.
*
* @param string $uuid
* The UUID.
* @param string $region
* The region.
* @param mixed[] $configuration
* The plugin configuration.
* @param mixed[] $additional
* (optional) Additional values.
* @param array[] $third_party_settings
* (optional) Any third party settings.
*
* @todo Remove $additional argument in
* https://www.drupal.org/project/drupal/issues/3160644 in drupal:12.0.x.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:90
public toRenderArray(array $contexts = array(), $in_preview = false): array Returns the renderable array for this component.
/**
* Returns the renderable array for this component.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of available contexts.
* @param bool $in_preview
* TRUE if the component is being previewed, FALSE otherwise.
*
* @return array
* A renderable array representing the content of the component.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:115
public get($property): mixed Gets any arbitrary property for the component.
/**
* Gets any arbitrary property for the component.
*
* @param string $property
* The property to retrieve.
*
* @deprecated in drupal:11.3.0 and is removed from drupal:12.0.0.
* Additional properties should be gotten via ::getThirdPartySetting().
*
* @see https://www.drupal.org/node/3100177
*
* @return mixed
* The value for that property, or NULL if the property does not exist.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:137
public set($property, $value): $this Sets a value to an arbitrary property for the component.
/**
* Sets a value to an arbitrary property for the component.
*
* @param string $property
* The property to use for the value.
* @param mixed $value
* The value to set.
*
* @deprecated in drupal:11.4.0 and is removed from drupal:12.0.0.
* Additional properties should be set via ::setThirdPartySetting().
*
* @see https://www.drupal.org/node/3100177
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:163
public getRegion(): string Gets the region for the component.
/**
* Gets the region for the component.
*
* @return string
* The region.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:180
public setRegion($region): $this Sets the region for the component.
/**
* Sets the region for the component.
*
* @param string $region
* The region.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:192
public getWeight(): int Gets the weight of the component.
/**
* Gets the weight of the component.
*
* @return int
* The zero-based weight of the component.
*
* @throws \UnexpectedValueException
* Thrown if the weight was never set.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:206
public setWeight($weight): $this Sets the weight of the component.
/**
* Sets the weight of the component.
*
* @param int $weight
* The zero-based weight of the component.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:218
public getConfiguration(): mixed[] Gets the component plugin configuration.
/**
* Gets the component plugin configuration.
*
* @return mixed[]
* The component plugin configuration.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:229
public setConfiguration(array $configuration): $this Sets the plugin configuration.
/**
* Sets the plugin configuration.
*
* @param mixed[] $configuration
* The plugin configuration.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:241
public getPluginId(): string Gets the plugin ID.
/**
* Gets the plugin ID.
*
* @return string
* The plugin ID.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:252
public getUuid(): string Gets the UUID for this component.
/**
* Gets the UUID for this component.
*
* @return string
* The UUID.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:266
public getPlugin(array $contexts = array()): \Drupal\Component\Plugin\PluginInspectionInterface Gets the plugin for this component.
/**
* Gets the plugin for this component.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of contexts to set on the plugin.
*
* @return \Drupal\Component\Plugin\PluginInspectionInterface
* The plugin.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:279
protected pluginManager(): \Drupal\Core\Block\BlockManagerInterface Wraps the component plugin manager.
/**
* Wraps the component plugin manager.
*
* @return \Drupal\Core\Block\BlockManagerInterface
* The plugin manager.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:293
protected contextHandler(): \Drupal\Core\Plugin\Context\ContextHandlerInterface Wraps the context handler.
/**
* Wraps the context handler.
*
* @return \Drupal\Core\Plugin\Context\ContextHandlerInterface
* The context handler.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:305
protected eventDispatcher(): \Symfony\Contracts\EventDispatcher\EventDispatcherInterface Wraps the event dispatcher.
/**
* Wraps the event dispatcher.
*
* @return \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* The event dispatcher.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:315
public toArray(): array Returns an array representation of the section component.
/**
* Returns an array representation of the section component.
*
* Only use this method if you are implementing custom storage for sections.
*
* @return array
* An array representation of the section component.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:327
public getThirdPartySetting($provider, $key, $default = null) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:377
public getThirdPartySettings($provider) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:384
public setThirdPartySetting($provider, $key, $value) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:391
public unsetThirdPartySetting($provider, $key) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:399
public getThirdPartyProviders(): array Gets the list of third parties that store information.
/**
* Gets the list of third parties that store information.
*
* @return array
* The list of third parties.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:415
public static Drupal\layout_builder\SectionComponent::fromArray(array $component): static Creates an object from an array representation of the section component.
/**
* Creates an object from an array representation of the section component.
*
* Only use this method if you are implementing custom storage for sections.
*
* @param array $component
* An array of section component data in the format returned by ::toArray().
*
* @return static
* The section component object.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:352
public __construct($uuid, $region, array $configuration = array(), array $additional = array(), array $third_party_settings = array()) Constructs a new SectionComponent.
/**
* Constructs a new SectionComponent.
*
* @param string $uuid
* The UUID.
* @param string $region
* The region.
* @param mixed[] $configuration
* The plugin configuration.
* @param mixed[] $additional
* (optional) Additional values.
* @param array[] $third_party_settings
* (optional) Any third party settings.
*
* @todo Remove $additional argument in
* https://www.drupal.org/project/drupal/issues/3160644 in drupal:12.0.x.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:90
public toRenderArray(array $contexts = array(), $in_preview = false): array Returns the renderable array for this component.
/**
* Returns the renderable array for this component.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of available contexts.
* @param bool $in_preview
* TRUE if the component is being previewed, FALSE otherwise.
*
* @return array
* A renderable array representing the content of the component.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:115
public get($property): mixed Gets any arbitrary property for the component.
/**
* Gets any arbitrary property for the component.
*
* @param string $property
* The property to retrieve.
*
* @deprecated in drupal:11.3.0 and is removed from drupal:12.0.0.
* Additional properties should be gotten via ::getThirdPartySetting().
*
* @see https://www.drupal.org/node/3100177
*
* @return mixed
* The value for that property, or NULL if the property does not exist.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:137
public set($property, $value): $this Sets a value to an arbitrary property for the component.
/**
* Sets a value to an arbitrary property for the component.
*
* @param string $property
* The property to use for the value.
* @param mixed $value
* The value to set.
*
* @deprecated in drupal:11.4.0 and is removed from drupal:12.0.0.
* Additional properties should be set via ::setThirdPartySetting().
*
* @see https://www.drupal.org/node/3100177
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:163
public getRegion(): string Gets the region for the component.
/**
* Gets the region for the component.
*
* @return string
* The region.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:180
public setRegion($region): $this Sets the region for the component.
/**
* Sets the region for the component.
*
* @param string $region
* The region.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:192
public getWeight(): int Gets the weight of the component.
/**
* Gets the weight of the component.
*
* @return int
* The zero-based weight of the component.
*
* @throws \UnexpectedValueException
* Thrown if the weight was never set.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:206
public setWeight($weight): $this Sets the weight of the component.
/**
* Sets the weight of the component.
*
* @param int $weight
* The zero-based weight of the component.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:218
public getConfiguration(): mixed[] Gets the component plugin configuration.
/**
* Gets the component plugin configuration.
*
* @return mixed[]
* The component plugin configuration.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:229
public setConfiguration(array $configuration): $this Sets the plugin configuration.
/**
* Sets the plugin configuration.
*
* @param mixed[] $configuration
* The plugin configuration.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:241
public getPluginId(): string Gets the plugin ID.
/**
* Gets the plugin ID.
*
* @return string
* The plugin ID.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:252
public getUuid(): string Gets the UUID for this component.
/**
* Gets the UUID for this component.
*
* @return string
* The UUID.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:266
public getPlugin(array $contexts = array()): \Drupal\Component\Plugin\PluginInspectionInterface Gets the plugin for this component.
/**
* Gets the plugin for this component.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of contexts to set on the plugin.
*
* @return \Drupal\Component\Plugin\PluginInspectionInterface
* The plugin.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:279
protected pluginManager(): \Drupal\Core\Block\BlockManagerInterface Wraps the component plugin manager.
/**
* Wraps the component plugin manager.
*
* @return \Drupal\Core\Block\BlockManagerInterface
* The plugin manager.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:293
protected contextHandler(): \Drupal\Core\Plugin\Context\ContextHandlerInterface Wraps the context handler.
/**
* Wraps the context handler.
*
* @return \Drupal\Core\Plugin\Context\ContextHandlerInterface
* The context handler.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:305
protected eventDispatcher(): \Symfony\Contracts\EventDispatcher\EventDispatcherInterface Wraps the event dispatcher.
/**
* Wraps the event dispatcher.
*
* @return \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* The event dispatcher.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:315
public toArray(): array Returns an array representation of the section component.
/**
* Returns an array representation of the section component.
*
* Only use this method if you are implementing custom storage for sections.
*
* @return array
* An array representation of the section component.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:327
public getThirdPartySetting($provider, $key, $default = null) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:377
public getThirdPartySettings($provider) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:384
public setThirdPartySetting($provider, $key, $value) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:391
public unsetThirdPartySetting($provider, $key) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:399
public getThirdPartyProviders(): array Gets the list of third parties that store information.
/**
* Gets the list of third parties that store information.
*
* @return array
* The list of third parties.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:415
public static Drupal\layout_builder\SectionComponent::fromArray(array $component): static Creates an object from an array representation of the section component.
/**
* Creates an object from an array representation of the section component.
*
* Only use this method if you are implementing custom storage for sections.
*
* @param array $component
* An array of section component data in the format returned by ::toArray().
*
* @return static
* The section component object.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:352
protected thirdPartySettings -> array (0)
public __construct($layout_id, array $layout_settings = array(), array $components = array(), array $third_party_settings = array()) Constructs a new Section.
new \Drupal\layout_builder\Section()
/**
* Constructs a new Section.
*
* @param string $layout_id
* The layout plugin ID.
* @param array $layout_settings
* (optional) The layout plugin settings.
* @param \Drupal\layout_builder\SectionComponent[] $components
* (optional) The components.
* @param array[] $third_party_settings
* (optional) Any third party settings.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:65
public toRenderArray(array $contexts = array(), $in_preview = false): array Returns the renderable array for this section.
/**
* Returns the renderable array for this section.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of available contexts.
* @param bool $in_preview
* TRUE if the section is being previewed, FALSE otherwise.
*
* @return array
* A renderable array representing the content of the section.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:85
public getLayout(array $contexts = array()): \Drupal\Core\Layout\LayoutInterface Gets the layout plugin for this section.
/**
* Gets the layout plugin for this section.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of available contexts.
*
* @return \Drupal\Core\Layout\LayoutInterface
* The layout plugin.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:115
public getLayoutId(): string Gets the layout plugin ID for this section.
/**
* Gets the layout plugin ID for this section.
*
* @return string
* The layout plugin ID.
*
* @internal
* This method should only be used by code responsible for storing the data.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:132
public getLayoutSettings(): mixed[] Gets the layout plugin settings for this section.
/**
* Gets the layout plugin settings for this section.
*
* @return mixed[]
* The layout plugin settings.
*
* @internal
* This method should only be used by code responsible for storing the data.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:145
public setLayoutSettings(array $layout_settings): $this Sets the layout plugin settings for this section.
/**
* Sets the layout plugin settings for this section.
*
* @param mixed[] $layout_settings
* The layout plugin settings.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:157
public getDefaultRegion(): string Gets the default region.
/**
* Gets the default region.
*
* @return string
* The machine-readable name of the default region.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:168
public getComponents(): \Drupal\layout_builder\SectionComponent[] Returns the components of the section.
/**
* Returns the components of the section.
*
* @return \Drupal\layout_builder\SectionComponent[]
* An array of components, keyed by the component UUID.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:178
public getComponent($uuid): \Drupal\layout_builder\SectionComponent Gets the component for a given UUID.
/**
* Gets the component for a given UUID.
*
* @param string $uuid
* The UUID of the component to retrieve.
*
* @return \Drupal\layout_builder\SectionComponent
* The component.
*
* @throws \InvalidArgumentException
* Thrown when the expected UUID does not exist.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:194
protected setComponent(Drupal\layout_builder\SectionComponent $component): $this Helper method to set a component.
/**
* Helper method to set a component.
*
* @param \Drupal\layout_builder\SectionComponent $component
* The component.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:210
public removeComponent($uuid): $this Removes a given component from a region.
/**
* Removes a given component from a region.
*
* @param string $uuid
* The UUID of the component to remove.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:223
public appendComponent(Drupal\layout_builder\SectionComponent $component): $this Appends a component to the end of a region.
/**
* Appends a component to the end of a region.
*
* @param \Drupal\layout_builder\SectionComponent $component
* The component being appended.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:236
protected getNextHighestWeight($region): int Returns the next highest weight of the component in a region.
/**
* Returns the next highest weight of the component in a region.
*
* @param string $region
* The region name.
*
* @return int
* A number higher than the highest weight of the component in the region.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:251
public getComponentsByRegion($region): \Drupal\layout_builder\SectionComponent[] Gets the components for a specific region.
/**
* Gets the components for a specific region.
*
* @param string $region
* The region name.
*
* @return \Drupal\layout_builder\SectionComponent[]
* An array of components in the specified region, sorted by weight.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:268
public insertAfterComponent($preceding_uuid, Drupal\layout_builder\SectionComponent $component): $this Inserts a component after a specified existing component.
/**
* Inserts a component after a specified existing component.
*
* @param string $preceding_uuid
* The UUID of the existing component to insert after.
* @param \Drupal\layout_builder\SectionComponent $component
* The component being inserted.
*
* @return $this
*
* @throws \InvalidArgumentException
* Thrown when the expected UUID does not exist.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:291
public insertComponent($delta, Drupal\layout_builder\SectionComponent $new_component): $this Inserts a component at a specified delta.
/**
* Inserts a component at a specified delta.
*
* @param int $delta
* The zero-based delta in which to insert the component.
* @param \Drupal\layout_builder\SectionComponent $new_component
* The component being inserted.
*
* @return $this
*
* @throws \OutOfBoundsException
* Thrown when the specified delta is invalid.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:314
protected layoutPluginManager(): \Drupal\Core\Layout\LayoutPluginManagerInterface Wraps the layout plugin manager.
/**
* Wraps the layout plugin manager.
*
* @return \Drupal\Core\Layout\LayoutPluginManagerInterface
* The layout plugin manager.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:343
public toArray(): array Returns an array representation of the section.
/**
* Returns an array representation of the section.
*
* Only use this method if you are implementing custom storage for sections.
*
* @return array
* An array representation of the section component.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:355
public __clone() Magic method: Implements a deep clone.
clone $0['layout_builder__layout'][2]['section']
/**
* Magic method: Implements a deep clone.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:396
public getThirdPartySetting($provider, $key, $default = null) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:440
protected contextHandler(): \Drupal\Core\Plugin\Context\ContextHandlerInterface Wraps the context handler.
/**
* Wraps the context handler.
*
* @return \Drupal\Core\Plugin\Context\ContextHandlerInterface
* The context handler.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:450
public static Drupal\layout_builder\Section::fromArray(array $section): static Creates an object from an array representation of the section.
/**
* Creates an object from an array representation of the section.
*
* Only use this method if you are implementing custom storage for sections.
*
* @param array $section
* An array of section data in the format returned by ::toArray().
*
* @return static
* The section object.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:377
public __construct($uuid, $region, array $configuration = array(), array $additional = array(), array $third_party_settings = array()) Constructs a new SectionComponent.
/**
* Constructs a new SectionComponent.
*
* @param string $uuid
* The UUID.
* @param string $region
* The region.
* @param mixed[] $configuration
* The plugin configuration.
* @param mixed[] $additional
* (optional) Additional values.
* @param array[] $third_party_settings
* (optional) Any third party settings.
*
* @todo Remove $additional argument in
* https://www.drupal.org/project/drupal/issues/3160644 in drupal:12.0.x.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:90
public toRenderArray(array $contexts = array(), $in_preview = false): array Returns the renderable array for this component.
/**
* Returns the renderable array for this component.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of available contexts.
* @param bool $in_preview
* TRUE if the component is being previewed, FALSE otherwise.
*
* @return array
* A renderable array representing the content of the component.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:115
public get($property): mixed Gets any arbitrary property for the component.
/**
* Gets any arbitrary property for the component.
*
* @param string $property
* The property to retrieve.
*
* @deprecated in drupal:11.3.0 and is removed from drupal:12.0.0.
* Additional properties should be gotten via ::getThirdPartySetting().
*
* @see https://www.drupal.org/node/3100177
*
* @return mixed
* The value for that property, or NULL if the property does not exist.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:137
public set($property, $value): $this Sets a value to an arbitrary property for the component.
/**
* Sets a value to an arbitrary property for the component.
*
* @param string $property
* The property to use for the value.
* @param mixed $value
* The value to set.
*
* @deprecated in drupal:11.4.0 and is removed from drupal:12.0.0.
* Additional properties should be set via ::setThirdPartySetting().
*
* @see https://www.drupal.org/node/3100177
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:163
public getRegion(): string Gets the region for the component.
/**
* Gets the region for the component.
*
* @return string
* The region.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:180
public setRegion($region): $this Sets the region for the component.
/**
* Sets the region for the component.
*
* @param string $region
* The region.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:192
public getWeight(): int Gets the weight of the component.
/**
* Gets the weight of the component.
*
* @return int
* The zero-based weight of the component.
*
* @throws \UnexpectedValueException
* Thrown if the weight was never set.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:206
public setWeight($weight): $this Sets the weight of the component.
/**
* Sets the weight of the component.
*
* @param int $weight
* The zero-based weight of the component.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:218
public getConfiguration(): mixed[] Gets the component plugin configuration.
/**
* Gets the component plugin configuration.
*
* @return mixed[]
* The component plugin configuration.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:229
public setConfiguration(array $configuration): $this Sets the plugin configuration.
/**
* Sets the plugin configuration.
*
* @param mixed[] $configuration
* The plugin configuration.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:241
public getPluginId(): string Gets the plugin ID.
/**
* Gets the plugin ID.
*
* @return string
* The plugin ID.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:252
public getUuid(): string Gets the UUID for this component.
/**
* Gets the UUID for this component.
*
* @return string
* The UUID.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:266
public getPlugin(array $contexts = array()): \Drupal\Component\Plugin\PluginInspectionInterface Gets the plugin for this component.
/**
* Gets the plugin for this component.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of contexts to set on the plugin.
*
* @return \Drupal\Component\Plugin\PluginInspectionInterface
* The plugin.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:279
protected pluginManager(): \Drupal\Core\Block\BlockManagerInterface Wraps the component plugin manager.
/**
* Wraps the component plugin manager.
*
* @return \Drupal\Core\Block\BlockManagerInterface
* The plugin manager.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:293
protected contextHandler(): \Drupal\Core\Plugin\Context\ContextHandlerInterface Wraps the context handler.
/**
* Wraps the context handler.
*
* @return \Drupal\Core\Plugin\Context\ContextHandlerInterface
* The context handler.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:305
protected eventDispatcher(): \Symfony\Contracts\EventDispatcher\EventDispatcherInterface Wraps the event dispatcher.
/**
* Wraps the event dispatcher.
*
* @return \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* The event dispatcher.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:315
public toArray(): array Returns an array representation of the section component.
/**
* Returns an array representation of the section component.
*
* Only use this method if you are implementing custom storage for sections.
*
* @return array
* An array representation of the section component.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:327
public getThirdPartySetting($provider, $key, $default = null) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:377
public getThirdPartySettings($provider) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:384
public setThirdPartySetting($provider, $key, $value) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:391
public unsetThirdPartySetting($provider, $key) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:399
public getThirdPartyProviders(): array Gets the list of third parties that store information.
/**
* Gets the list of third parties that store information.
*
* @return array
* The list of third parties.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:415
public static Drupal\layout_builder\SectionComponent::fromArray(array $component): static Creates an object from an array representation of the section component.
/**
* Creates an object from an array representation of the section component.
*
* Only use this method if you are implementing custom storage for sections.
*
* @param array $component
* An array of section component data in the format returned by ::toArray().
*
* @return static
* The section component object.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:352
public __construct($uuid, $region, array $configuration = array(), array $additional = array(), array $third_party_settings = array()) Constructs a new SectionComponent.
/**
* Constructs a new SectionComponent.
*
* @param string $uuid
* The UUID.
* @param string $region
* The region.
* @param mixed[] $configuration
* The plugin configuration.
* @param mixed[] $additional
* (optional) Additional values.
* @param array[] $third_party_settings
* (optional) Any third party settings.
*
* @todo Remove $additional argument in
* https://www.drupal.org/project/drupal/issues/3160644 in drupal:12.0.x.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:90
public toRenderArray(array $contexts = array(), $in_preview = false): array Returns the renderable array for this component.
/**
* Returns the renderable array for this component.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of available contexts.
* @param bool $in_preview
* TRUE if the component is being previewed, FALSE otherwise.
*
* @return array
* A renderable array representing the content of the component.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:115
public get($property): mixed Gets any arbitrary property for the component.
/**
* Gets any arbitrary property for the component.
*
* @param string $property
* The property to retrieve.
*
* @deprecated in drupal:11.3.0 and is removed from drupal:12.0.0.
* Additional properties should be gotten via ::getThirdPartySetting().
*
* @see https://www.drupal.org/node/3100177
*
* @return mixed
* The value for that property, or NULL if the property does not exist.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:137
public set($property, $value): $this Sets a value to an arbitrary property for the component.
/**
* Sets a value to an arbitrary property for the component.
*
* @param string $property
* The property to use for the value.
* @param mixed $value
* The value to set.
*
* @deprecated in drupal:11.4.0 and is removed from drupal:12.0.0.
* Additional properties should be set via ::setThirdPartySetting().
*
* @see https://www.drupal.org/node/3100177
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:163
public getRegion(): string Gets the region for the component.
/**
* Gets the region for the component.
*
* @return string
* The region.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:180
public setRegion($region): $this Sets the region for the component.
/**
* Sets the region for the component.
*
* @param string $region
* The region.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:192
public getWeight(): int Gets the weight of the component.
/**
* Gets the weight of the component.
*
* @return int
* The zero-based weight of the component.
*
* @throws \UnexpectedValueException
* Thrown if the weight was never set.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:206
public setWeight($weight): $this Sets the weight of the component.
/**
* Sets the weight of the component.
*
* @param int $weight
* The zero-based weight of the component.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:218
public getConfiguration(): mixed[] Gets the component plugin configuration.
/**
* Gets the component plugin configuration.
*
* @return mixed[]
* The component plugin configuration.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:229
public setConfiguration(array $configuration): $this Sets the plugin configuration.
/**
* Sets the plugin configuration.
*
* @param mixed[] $configuration
* The plugin configuration.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:241
public getPluginId(): string Gets the plugin ID.
/**
* Gets the plugin ID.
*
* @return string
* The plugin ID.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:252
public getUuid(): string Gets the UUID for this component.
/**
* Gets the UUID for this component.
*
* @return string
* The UUID.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:266
public getPlugin(array $contexts = array()): \Drupal\Component\Plugin\PluginInspectionInterface Gets the plugin for this component.
/**
* Gets the plugin for this component.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of contexts to set on the plugin.
*
* @return \Drupal\Component\Plugin\PluginInspectionInterface
* The plugin.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:279
protected pluginManager(): \Drupal\Core\Block\BlockManagerInterface Wraps the component plugin manager.
/**
* Wraps the component plugin manager.
*
* @return \Drupal\Core\Block\BlockManagerInterface
* The plugin manager.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:293
protected contextHandler(): \Drupal\Core\Plugin\Context\ContextHandlerInterface Wraps the context handler.
/**
* Wraps the context handler.
*
* @return \Drupal\Core\Plugin\Context\ContextHandlerInterface
* The context handler.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:305
protected eventDispatcher(): \Symfony\Contracts\EventDispatcher\EventDispatcherInterface Wraps the event dispatcher.
/**
* Wraps the event dispatcher.
*
* @return \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* The event dispatcher.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:315
public toArray(): array Returns an array representation of the section component.
/**
* Returns an array representation of the section component.
*
* Only use this method if you are implementing custom storage for sections.
*
* @return array
* An array representation of the section component.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:327
public getThirdPartySetting($provider, $key, $default = null) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:377
public getThirdPartySettings($provider) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:384
public setThirdPartySetting($provider, $key, $value) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:391
public unsetThirdPartySetting($provider, $key) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:399
public getThirdPartyProviders(): array Gets the list of third parties that store information.
/**
* Gets the list of third parties that store information.
*
* @return array
* The list of third parties.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:415
public static Drupal\layout_builder\SectionComponent::fromArray(array $component): static Creates an object from an array representation of the section component.
/**
* Creates an object from an array representation of the section component.
*
* Only use this method if you are implementing custom storage for sections.
*
* @param array $component
* An array of section component data in the format returned by ::toArray().
*
* @return static
* The section component object.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:352
protected thirdPartySettings -> array (0)
public __construct($layout_id, array $layout_settings = array(), array $components = array(), array $third_party_settings = array()) Constructs a new Section.
new \Drupal\layout_builder\Section()
/**
* Constructs a new Section.
*
* @param string $layout_id
* The layout plugin ID.
* @param array $layout_settings
* (optional) The layout plugin settings.
* @param \Drupal\layout_builder\SectionComponent[] $components
* (optional) The components.
* @param array[] $third_party_settings
* (optional) Any third party settings.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:65
public toRenderArray(array $contexts = array(), $in_preview = false): array Returns the renderable array for this section.
/**
* Returns the renderable array for this section.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of available contexts.
* @param bool $in_preview
* TRUE if the section is being previewed, FALSE otherwise.
*
* @return array
* A renderable array representing the content of the section.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:85
public getLayout(array $contexts = array()): \Drupal\Core\Layout\LayoutInterface Gets the layout plugin for this section.
/**
* Gets the layout plugin for this section.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of available contexts.
*
* @return \Drupal\Core\Layout\LayoutInterface
* The layout plugin.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:115
public getLayoutId(): string Gets the layout plugin ID for this section.
/**
* Gets the layout plugin ID for this section.
*
* @return string
* The layout plugin ID.
*
* @internal
* This method should only be used by code responsible for storing the data.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:132
public getLayoutSettings(): mixed[] Gets the layout plugin settings for this section.
/**
* Gets the layout plugin settings for this section.
*
* @return mixed[]
* The layout plugin settings.
*
* @internal
* This method should only be used by code responsible for storing the data.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:145
public setLayoutSettings(array $layout_settings): $this Sets the layout plugin settings for this section.
/**
* Sets the layout plugin settings for this section.
*
* @param mixed[] $layout_settings
* The layout plugin settings.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:157
public getDefaultRegion(): string Gets the default region.
/**
* Gets the default region.
*
* @return string
* The machine-readable name of the default region.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:168
public getComponents(): \Drupal\layout_builder\SectionComponent[] Returns the components of the section.
/**
* Returns the components of the section.
*
* @return \Drupal\layout_builder\SectionComponent[]
* An array of components, keyed by the component UUID.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:178
public getComponent($uuid): \Drupal\layout_builder\SectionComponent Gets the component for a given UUID.
/**
* Gets the component for a given UUID.
*
* @param string $uuid
* The UUID of the component to retrieve.
*
* @return \Drupal\layout_builder\SectionComponent
* The component.
*
* @throws \InvalidArgumentException
* Thrown when the expected UUID does not exist.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:194
protected setComponent(Drupal\layout_builder\SectionComponent $component): $this Helper method to set a component.
/**
* Helper method to set a component.
*
* @param \Drupal\layout_builder\SectionComponent $component
* The component.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:210
public removeComponent($uuid): $this Removes a given component from a region.
/**
* Removes a given component from a region.
*
* @param string $uuid
* The UUID of the component to remove.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:223
public appendComponent(Drupal\layout_builder\SectionComponent $component): $this Appends a component to the end of a region.
/**
* Appends a component to the end of a region.
*
* @param \Drupal\layout_builder\SectionComponent $component
* The component being appended.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:236
protected getNextHighestWeight($region): int Returns the next highest weight of the component in a region.
/**
* Returns the next highest weight of the component in a region.
*
* @param string $region
* The region name.
*
* @return int
* A number higher than the highest weight of the component in the region.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:251
public getComponentsByRegion($region): \Drupal\layout_builder\SectionComponent[] Gets the components for a specific region.
/**
* Gets the components for a specific region.
*
* @param string $region
* The region name.
*
* @return \Drupal\layout_builder\SectionComponent[]
* An array of components in the specified region, sorted by weight.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:268
public insertAfterComponent($preceding_uuid, Drupal\layout_builder\SectionComponent $component): $this Inserts a component after a specified existing component.
/**
* Inserts a component after a specified existing component.
*
* @param string $preceding_uuid
* The UUID of the existing component to insert after.
* @param \Drupal\layout_builder\SectionComponent $component
* The component being inserted.
*
* @return $this
*
* @throws \InvalidArgumentException
* Thrown when the expected UUID does not exist.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:291
public insertComponent($delta, Drupal\layout_builder\SectionComponent $new_component): $this Inserts a component at a specified delta.
/**
* Inserts a component at a specified delta.
*
* @param int $delta
* The zero-based delta in which to insert the component.
* @param \Drupal\layout_builder\SectionComponent $new_component
* The component being inserted.
*
* @return $this
*
* @throws \OutOfBoundsException
* Thrown when the specified delta is invalid.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:314
protected layoutPluginManager(): \Drupal\Core\Layout\LayoutPluginManagerInterface Wraps the layout plugin manager.
/**
* Wraps the layout plugin manager.
*
* @return \Drupal\Core\Layout\LayoutPluginManagerInterface
* The layout plugin manager.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:343
public toArray(): array Returns an array representation of the section.
/**
* Returns an array representation of the section.
*
* Only use this method if you are implementing custom storage for sections.
*
* @return array
* An array representation of the section component.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:355
public __clone() Magic method: Implements a deep clone.
clone $0['layout_builder__layout'][3]['section']
/**
* Magic method: Implements a deep clone.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:396
public getThirdPartySetting($provider, $key, $default = null) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:440
protected contextHandler(): \Drupal\Core\Plugin\Context\ContextHandlerInterface Wraps the context handler.
/**
* Wraps the context handler.
*
* @return \Drupal\Core\Plugin\Context\ContextHandlerInterface
* The context handler.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:450
public static Drupal\layout_builder\Section::fromArray(array $section): static Creates an object from an array representation of the section.
/**
* Creates an object from an array representation of the section.
*
* Only use this method if you are implementing custom storage for sections.
*
* @param array $section
* An array of section data in the format returned by ::toArray().
*
* @return static
* The section object.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:377
public __construct($uuid, $region, array $configuration = array(), array $additional = array(), array $third_party_settings = array()) Constructs a new SectionComponent.
/**
* Constructs a new SectionComponent.
*
* @param string $uuid
* The UUID.
* @param string $region
* The region.
* @param mixed[] $configuration
* The plugin configuration.
* @param mixed[] $additional
* (optional) Additional values.
* @param array[] $third_party_settings
* (optional) Any third party settings.
*
* @todo Remove $additional argument in
* https://www.drupal.org/project/drupal/issues/3160644 in drupal:12.0.x.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:90
public toRenderArray(array $contexts = array(), $in_preview = false): array Returns the renderable array for this component.
/**
* Returns the renderable array for this component.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of available contexts.
* @param bool $in_preview
* TRUE if the component is being previewed, FALSE otherwise.
*
* @return array
* A renderable array representing the content of the component.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:115
public get($property): mixed Gets any arbitrary property for the component.
/**
* Gets any arbitrary property for the component.
*
* @param string $property
* The property to retrieve.
*
* @deprecated in drupal:11.3.0 and is removed from drupal:12.0.0.
* Additional properties should be gotten via ::getThirdPartySetting().
*
* @see https://www.drupal.org/node/3100177
*
* @return mixed
* The value for that property, or NULL if the property does not exist.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:137
public set($property, $value): $this Sets a value to an arbitrary property for the component.
/**
* Sets a value to an arbitrary property for the component.
*
* @param string $property
* The property to use for the value.
* @param mixed $value
* The value to set.
*
* @deprecated in drupal:11.4.0 and is removed from drupal:12.0.0.
* Additional properties should be set via ::setThirdPartySetting().
*
* @see https://www.drupal.org/node/3100177
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:163
public getRegion(): string Gets the region for the component.
/**
* Gets the region for the component.
*
* @return string
* The region.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:180
public setRegion($region): $this Sets the region for the component.
/**
* Sets the region for the component.
*
* @param string $region
* The region.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:192
public getWeight(): int Gets the weight of the component.
/**
* Gets the weight of the component.
*
* @return int
* The zero-based weight of the component.
*
* @throws \UnexpectedValueException
* Thrown if the weight was never set.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:206
public setWeight($weight): $this Sets the weight of the component.
/**
* Sets the weight of the component.
*
* @param int $weight
* The zero-based weight of the component.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:218
public getConfiguration(): mixed[] Gets the component plugin configuration.
/**
* Gets the component plugin configuration.
*
* @return mixed[]
* The component plugin configuration.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:229
public setConfiguration(array $configuration): $this Sets the plugin configuration.
/**
* Sets the plugin configuration.
*
* @param mixed[] $configuration
* The plugin configuration.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:241
public getPluginId(): string Gets the plugin ID.
/**
* Gets the plugin ID.
*
* @return string
* The plugin ID.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:252
public getUuid(): string Gets the UUID for this component.
/**
* Gets the UUID for this component.
*
* @return string
* The UUID.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:266
public getPlugin(array $contexts = array()): \Drupal\Component\Plugin\PluginInspectionInterface Gets the plugin for this component.
/**
* Gets the plugin for this component.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of contexts to set on the plugin.
*
* @return \Drupal\Component\Plugin\PluginInspectionInterface
* The plugin.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:279
protected pluginManager(): \Drupal\Core\Block\BlockManagerInterface Wraps the component plugin manager.
/**
* Wraps the component plugin manager.
*
* @return \Drupal\Core\Block\BlockManagerInterface
* The plugin manager.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:293
protected contextHandler(): \Drupal\Core\Plugin\Context\ContextHandlerInterface Wraps the context handler.
/**
* Wraps the context handler.
*
* @return \Drupal\Core\Plugin\Context\ContextHandlerInterface
* The context handler.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:305
protected eventDispatcher(): \Symfony\Contracts\EventDispatcher\EventDispatcherInterface Wraps the event dispatcher.
/**
* Wraps the event dispatcher.
*
* @return \Symfony\Contracts\EventDispatcher\EventDispatcherInterface
* The event dispatcher.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:315
public toArray(): array Returns an array representation of the section component.
/**
* Returns an array representation of the section component.
*
* Only use this method if you are implementing custom storage for sections.
*
* @return array
* An array representation of the section component.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:327
public getThirdPartySetting($provider, $key, $default = null) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:377
public getThirdPartySettings($provider) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:384
public setThirdPartySetting($provider, $key, $value) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:391
public unsetThirdPartySetting($provider, $key) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:399
public getThirdPartyProviders(): array Gets the list of third parties that store information.
/**
* Gets the list of third parties that store information.
*
* @return array
* The list of third parties.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:415
public static Drupal\layout_builder\SectionComponent::fromArray(array $component): static Creates an object from an array representation of the section component.
/**
* Creates an object from an array representation of the section component.
*
* Only use this method if you are implementing custom storage for sections.
*
* @param array $component
* An array of section component data in the format returned by ::toArray().
*
* @return static
* The section component object.
*/
Defined in <drupal>/core/modules/layout_builder/src/SectionComponent.php:352
protected thirdPartySettings -> array (0)
public __construct($layout_id, array $layout_settings = array(), array $components = array(), array $third_party_settings = array()) Constructs a new Section.
new \Drupal\layout_builder\Section()
/**
* Constructs a new Section.
*
* @param string $layout_id
* The layout plugin ID.
* @param array $layout_settings
* (optional) The layout plugin settings.
* @param \Drupal\layout_builder\SectionComponent[] $components
* (optional) The components.
* @param array[] $third_party_settings
* (optional) Any third party settings.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:65
public toRenderArray(array $contexts = array(), $in_preview = false): array Returns the renderable array for this section.
/**
* Returns the renderable array for this section.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of available contexts.
* @param bool $in_preview
* TRUE if the section is being previewed, FALSE otherwise.
*
* @return array
* A renderable array representing the content of the section.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:85
public getLayout(array $contexts = array()): \Drupal\Core\Layout\LayoutInterface Gets the layout plugin for this section.
/**
* Gets the layout plugin for this section.
*
* @param \Drupal\Core\Plugin\Context\ContextInterface[] $contexts
* An array of available contexts.
*
* @return \Drupal\Core\Layout\LayoutInterface
* The layout plugin.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:115
public getLayoutId(): string Gets the layout plugin ID for this section.
/**
* Gets the layout plugin ID for this section.
*
* @return string
* The layout plugin ID.
*
* @internal
* This method should only be used by code responsible for storing the data.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:132
public getLayoutSettings(): mixed[] Gets the layout plugin settings for this section.
/**
* Gets the layout plugin settings for this section.
*
* @return mixed[]
* The layout plugin settings.
*
* @internal
* This method should only be used by code responsible for storing the data.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:145
public setLayoutSettings(array $layout_settings): $this Sets the layout plugin settings for this section.
/**
* Sets the layout plugin settings for this section.
*
* @param mixed[] $layout_settings
* The layout plugin settings.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:157
public getDefaultRegion(): string Gets the default region.
/**
* Gets the default region.
*
* @return string
* The machine-readable name of the default region.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:168
public getComponents(): \Drupal\layout_builder\SectionComponent[] Returns the components of the section.
/**
* Returns the components of the section.
*
* @return \Drupal\layout_builder\SectionComponent[]
* An array of components, keyed by the component UUID.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:178
public getComponent($uuid): \Drupal\layout_builder\SectionComponent Gets the component for a given UUID.
/**
* Gets the component for a given UUID.
*
* @param string $uuid
* The UUID of the component to retrieve.
*
* @return \Drupal\layout_builder\SectionComponent
* The component.
*
* @throws \InvalidArgumentException
* Thrown when the expected UUID does not exist.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:194
protected setComponent(Drupal\layout_builder\SectionComponent $component): $this Helper method to set a component.
/**
* Helper method to set a component.
*
* @param \Drupal\layout_builder\SectionComponent $component
* The component.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:210
public removeComponent($uuid): $this Removes a given component from a region.
/**
* Removes a given component from a region.
*
* @param string $uuid
* The UUID of the component to remove.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:223
public appendComponent(Drupal\layout_builder\SectionComponent $component): $this Appends a component to the end of a region.
/**
* Appends a component to the end of a region.
*
* @param \Drupal\layout_builder\SectionComponent $component
* The component being appended.
*
* @return $this
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:236
protected getNextHighestWeight($region): int Returns the next highest weight of the component in a region.
/**
* Returns the next highest weight of the component in a region.
*
* @param string $region
* The region name.
*
* @return int
* A number higher than the highest weight of the component in the region.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:251
public getComponentsByRegion($region): \Drupal\layout_builder\SectionComponent[] Gets the components for a specific region.
/**
* Gets the components for a specific region.
*
* @param string $region
* The region name.
*
* @return \Drupal\layout_builder\SectionComponent[]
* An array of components in the specified region, sorted by weight.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:268
public insertAfterComponent($preceding_uuid, Drupal\layout_builder\SectionComponent $component): $this Inserts a component after a specified existing component.
/**
* Inserts a component after a specified existing component.
*
* @param string $preceding_uuid
* The UUID of the existing component to insert after.
* @param \Drupal\layout_builder\SectionComponent $component
* The component being inserted.
*
* @return $this
*
* @throws \InvalidArgumentException
* Thrown when the expected UUID does not exist.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:291
public insertComponent($delta, Drupal\layout_builder\SectionComponent $new_component): $this Inserts a component at a specified delta.
/**
* Inserts a component at a specified delta.
*
* @param int $delta
* The zero-based delta in which to insert the component.
* @param \Drupal\layout_builder\SectionComponent $new_component
* The component being inserted.
*
* @return $this
*
* @throws \OutOfBoundsException
* Thrown when the specified delta is invalid.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:314
protected layoutPluginManager(): \Drupal\Core\Layout\LayoutPluginManagerInterface Wraps the layout plugin manager.
/**
* Wraps the layout plugin manager.
*
* @return \Drupal\Core\Layout\LayoutPluginManagerInterface
* The layout plugin manager.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:343
public toArray(): array Returns an array representation of the section.
/**
* Returns an array representation of the section.
*
* Only use this method if you are implementing custom storage for sections.
*
* @return array
* An array representation of the section component.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:355
public __clone() Magic method: Implements a deep clone.
clone $0['layout_builder__layout'][4]['section']
/**
* Magic method: Implements a deep clone.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:396
public getThirdPartySetting($provider, $key, $default = null) {@inheritdoc}
/**
* {@inheritdoc}
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:440
protected contextHandler(): \Drupal\Core\Plugin\Context\ContextHandlerInterface Wraps the context handler.
/**
* Wraps the context handler.
*
* @return \Drupal\Core\Plugin\Context\ContextHandlerInterface
* The context handler.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:450
public static Drupal\layout_builder\Section::fromArray(array $section): static Creates an object from an array representation of the section.
/**
* Creates an object from an array representation of the section.
*
* Only use this method if you are implementing custom storage for sections.
*
* @param array $section
* An array of section data in the format returned by ::toArray().
*
* @return static
* The section object.
*/
Defined in <drupal>/core/modules/layout_builder/src/Section.php:377