function TypedDataPropertyDeriverBase::getDataType
Same name in other branches
- 8.x-3.x src/Plugin/Deriver/TypedDataPropertyDeriverBase.php \Drupal\ctools\Plugin\Deriver\TypedDataPropertyDeriverBase::getDataType()
Parameters
$property_definition:
Return value
mixed
File
-
src/
Plugin/ Deriver/ TypedDataPropertyDeriverBase.php, line 83
Class
Namespace
Drupal\ctools\Plugin\DeriverCode
protected function getDataType($property_definition) {
if ($property_definition instanceof DataReferenceDefinitionInterface) {
return $property_definition->getTargetDefinition()
->getDataType();
}
if ($property_definition instanceof ListDataDefinitionInterface) {
return $property_definition->getItemDefinition()
->getDataType();
}
return $property_definition->getDataType();
}