protected function FieldInheritancePluginBase::inheritData in Field Inheritance 8
Same name and namespace in other branches
- 2.0.x src/Plugin/FieldInheritance/FieldInheritancePluginBase.php \Drupal\field_inheritance\Plugin\FieldInheritance\FieldInheritancePluginBase::inheritData()
Retrieve inherited data.
Return value
string The inherited data.
1 call to FieldInheritancePluginBase::inheritData()
- FieldInheritancePluginBase::computeValue in src/
Plugin/ FieldInheritance/ FieldInheritancePluginBase.php - Compute the value of the field.
File
- src/
Plugin/ FieldInheritance/ FieldInheritancePluginBase.php, line 227
Class
- FieldInheritancePluginBase
- Abstract class FieldInheritancePluginBase.
Namespace
Drupal\field_inheritance\Plugin\FieldInheritanceCode
protected function inheritData() {
$source_entity = $this
->getSourceEntity();
if ($source_entity === FALSE) {
return [];
}
return $source_entity->{$this
->getSourceField()}
->getValue() ?? '';
}