function ComputedString::getValue
Same name in other branches
- 8.9.x core/modules/system/tests/modules/entity_test/src/TypedData/ComputedString.php \Drupal\entity_test\TypedData\ComputedString::getValue()
- 10 core/modules/system/tests/modules/entity_test/src/TypedData/ComputedString.php \Drupal\entity_test\TypedData\ComputedString::getValue()
- 11.x core/modules/system/tests/modules/entity_test/src/TypedData/ComputedString.php \Drupal\entity_test\TypedData\ComputedString::getValue()
Overrides TypedData::getValue
File
-
core/
modules/ system/ tests/ modules/ entity_test/ src/ TypedData/ ComputedString.php, line 17
Class
- ComputedString
- A computed property for test strings.
Namespace
Drupal\entity_test\TypedDataCode
public function getValue() {
/** @var \Drupal\Core\Field\FieldItemInterface $item */
$item = $this->getParent();
$computed_value = "Computed! " . $item->get('value')
->getString();
return $computed_value;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.