protected function CountryItem::getFieldStorageDefinition in Country 8
Gets the field storage of the used field.
Return value
\Drupal\Core\Field\FieldStorageDefinitionInterface
File
- src/
Plugin/ views/ filter/ CountryItem.php, line 193
Class
- CountryItem
- Filter by country ISO2.
Namespace
Drupal\country\Plugin\views\filterCode
protected function getFieldStorageDefinition() {
$definitions = $this->entityFieldManager
->getFieldStorageDefinitions($this->definition['entity_type']);
$definition = NULL;
// @todo Unify 'entity field'/'field_name' instead of converting back and
// forth. https://www.drupal.org/node/2410779
if (isset($this->definition['field_name'])) {
$definition = $definitions[$this->definition['field_name']];
}
elseif (isset($this->definition['entity field'])) {
$definition = $definitions[$this->definition['entity field']];
}
return $definition;
}