function ListDataDefinition::__clone

Same name in other branches
  1. 9 core/lib/Drupal/Core/TypedData/ListDataDefinition.php \Drupal\Core\TypedData\ListDataDefinition::__clone()
  2. 8.9.x core/lib/Drupal/Core/TypedData/ListDataDefinition.php \Drupal\Core\TypedData\ListDataDefinition::__clone()
  3. 10 core/lib/Drupal/Core/TypedData/ListDataDefinition.php \Drupal\Core\TypedData\ListDataDefinition::__clone()

Magic method: Implements a deep clone.

1 call to ListDataDefinition::__clone()
BaseFieldDefinition::__clone in core/lib/Drupal/Core/Field/BaseFieldDefinition.php
Magic method: Implements a deep clone.
1 method overrides ListDataDefinition::__clone()
BaseFieldDefinition::__clone in core/lib/Drupal/Core/Field/BaseFieldDefinition.php
Magic method: Implements a deep clone.

File

core/lib/Drupal/Core/TypedData/ListDataDefinition.php, line 112

Class

ListDataDefinition
A typed data definition class for defining lists.

Namespace

Drupal\Core\TypedData

Code

public function __clone() {
    // Ensure the itemDefinition property is actually cloned by overwriting the
    // original reference.
    $this->itemDefinition = clone $this->itemDefinition;
}

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