function ComputedItemListTrait::ensureComputedValue
Same name in other branches
- 9 core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php \Drupal\Core\TypedData\ComputedItemListTrait::ensureComputedValue()
- 10 core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php \Drupal\Core\TypedData\ComputedItemListTrait::ensureComputedValue()
- 11.x core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php \Drupal\Core\TypedData\ComputedItemListTrait::ensureComputedValue()
Ensures that values are only computed once.
10 calls to ComputedItemListTrait::ensureComputedValue()
- ComputedItemListTrait::appendItem in core/
lib/ Drupal/ Core/ TypedData/ ComputedItemListTrait.php - ComputedItemListTrait::count in core/
lib/ Drupal/ Core/ TypedData/ ComputedItemListTrait.php - ComputedItemListTrait::get in core/
lib/ Drupal/ Core/ TypedData/ ComputedItemListTrait.php - ComputedItemListTrait::getIterator in core/
lib/ Drupal/ Core/ TypedData/ ComputedItemListTrait.php - ComputedItemListTrait::getString in core/
lib/ Drupal/ Core/ TypedData/ ComputedItemListTrait.php
File
-
core/
lib/ Drupal/ Core/ TypedData/ ComputedItemListTrait.php, line 32
Class
- ComputedItemListTrait
- Provides common functionality for computed item lists.
Namespace
Drupal\Core\TypedDataCode
protected function ensureComputedValue() {
if ($this->valueComputed === FALSE) {
$this->computeValue();
$this->valueComputed = TRUE;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.