function Section::__clone

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

Magic method: Implements a deep clone.

File

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

Class

Section
Provides a domain object for layout sections.

Namespace

Drupal\layout_builder

Code

public function __clone() {
    foreach ($this->components as $uuid => $component) {
        $this->components[$uuid] = clone $component;
    }
}

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