function Section::removeComponent

Same name in other branches
  1. 9 core/modules/layout_builder/src/Section.php \Drupal\layout_builder\Section::removeComponent()
  2. 8.9.x core/modules/layout_builder/src/Section.php \Drupal\layout_builder\Section::removeComponent()
  3. 10 core/modules/layout_builder/src/Section.php \Drupal\layout_builder\Section::removeComponent()

Removes a given component from a region.

Parameters

string $uuid: The UUID of the component to remove.

Return value

$this

File

core/modules/layout_builder/src/Section.php, line 223

Class

Section
Provides a domain object for layout sections.

Namespace

Drupal\layout_builder

Code

public function removeComponent($uuid) {
    unset($this->components[$uuid]);
    return $this;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.