protected function FieldUtilsTrait::getFieldStorageDefinition in Scheduled Updates 8
Utility Function to load a single field definition.
Parameters
$entity_type_id:
$field_name:
Return value
\Drupal\Core\Field\FieldStorageDefinitionInterface|null
2 calls to FieldUtilsTrait::getFieldStorageDefinition()
- FieldManager::cloneField in src/
FieldManager.php - [@inheritdoc}
- FieldManager::fieldNameExists in src/
FieldManager.php - Checks if a field machine name is taken.
File
- src/
FieldUtilsTrait.php, line 171 - Contains \Drupal\scheduled_updates\FieldUtilsTrait.
Class
Namespace
Drupal\scheduled_updatesCode
protected function getFieldStorageDefinition($entity_type_id, $field_name) {
$definitions = $this
->FieldManager()
->getFieldStorageDefinitions($entity_type_id);
if (!isset($definitions[$field_name])) {
return NULL;
}
return $definitions[$field_name];
}