diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php index 71df4f4..d3d25f0 100644 --- a/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -106,7 +106,7 @@ class EntityManager extends PluginManagerBase implements EntityManagerInterface * * @var array */ - protected $storageFieldDefinitions; + protected $fieldStorageDefinitions; /** * The root paths. @@ -496,28 +496,28 @@ protected function buildBundleFieldDefinitions($entity_type_id, $bundle, array $ /** * {@inheritdoc} */ - public function getStorageFieldDefinitions($entity_type_id) { - if (!isset($this->storageFieldDefinitions[$entity_type_id])) { - $this->storageFieldDefinitions[$entity_type_id] = array(); + public function getFieldStorageDefinitions($entity_type_id) { + if (!isset($this->fieldStorageDefinitions[$entity_type_id])) { + $this->fieldStorageDefinitions[$entity_type_id] = array(); // Add all non-computed base fields. foreach ($this->getBaseFieldDefinitions($entity_type_id) as $field_name => $definition) { if (!$definition->isComputed()) { - $this->storageFieldDefinitions[$entity_type_id][$field_name] = $definition; + $this->fieldStorageDefinitions[$entity_type_id][$field_name] = $definition; } } // Not prepared, try to load from cache. - $cid = 'entity_storage_field_definitions:' . $entity_type_id . ':' . $this->languageManager->getCurrentLanguage()->id; + $cid = 'entity_field_storage_definitions:' . $entity_type_id . ':' . $this->languageManager->getCurrentLanguage()->id; if ($cache = $this->cache->get($cid)) { - $storage_field_definitions = $cache->data; + $field_storage_definitions = $cache->data; } else { // Rebuild the definitions and put it into the cache. - $storage_field_definitions = $this->buildStorageFieldDefinitions($entity_type_id); - $this->cache->set($cid, $storage_field_definitions, Cache::PERMANENT, array('entity_types' => TRUE, 'entity_field_info' => TRUE)); + $field_storage_definitions = $this->buildFieldStorageDefinitions($entity_type_id); + $this->cache->set($cid, $field_storage_definitions, Cache::PERMANENT, array('entity_types' => TRUE, 'entity_field_info' => TRUE)); } - $this->storageFieldDefinitions[$entity_type_id] += $storage_field_definitions; + $this->fieldStorageDefinitions[$entity_type_id] += $field_storage_definitions; } - return $this->storageFieldDefinitions[$entity_type_id]; + return $this->fieldStorageDefinitions[$entity_type_id]; } /** @@ -527,16 +527,16 @@ public function getStorageFieldDefinitions($entity_type_id) { * The entity type ID. Only entity types that implement * \Drupal\Core\Entity\ContentEntityInterface are supported * - * @return \Drupal\Core\Field\StorageFieldDefinitionInterface[] + * @return \Drupal\Core\Field\FieldStorageDefinitionInterface[] * An array of storage field definitions, keyed by field name. */ - protected function buildStorageFieldDefinitions($entity_type_id) { + protected function buildFieldStorageDefinitions($entity_type_id) { $entity_type = $this->getDefinition($entity_type_id); $field_definitions = array(); // Retrieve base field definitions from modules. - foreach ($this->moduleHandler->getImplementations('entity_storage_field_info') as $module) { - $module_definitions = $this->moduleHandler->invoke($module, 'entity_storage_field_info', array($entity_type)); + foreach ($this->moduleHandler->getImplementations('entity_field_storage_info') as $module) { + $module_definitions = $this->moduleHandler->invoke($module, 'entity_field_storage_info', array($entity_type)); if (!empty($module_definitions)) { // Ensure the provider key actually matches the name of the provider // defining the field. @@ -552,7 +552,7 @@ protected function buildStorageFieldDefinitions($entity_type_id) { } // Invoke alter hook. - $this->moduleHandler->alter('entity_storage_field_info', $field_definitions, $entity_type); + $this->moduleHandler->alter('entity_field_storage_info', $field_definitions, $entity_type); return $field_definitions; } @@ -563,7 +563,7 @@ protected function buildStorageFieldDefinitions($entity_type_id) { public function clearCachedFieldDefinitions() { $this->baseFieldDefinitions = array(); $this->fieldDefinitions = array(); - $this->storageFieldDefinitions = array(); + $this->fieldStorageDefinitions = array(); Cache::deleteTags(array('entity_field_info' => TRUE)); } diff --git a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php index e2e4be7..bd9dc35 100644 --- a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php @@ -64,19 +64,19 @@ public function getFieldDefinitions($entity_type_id, $bundle); * fields equal the full base field definition (i.e. they implement * \Drupal\Core\Field\FieldDefinitionInterface), while the storage fields for * bundle fields may implement - * \Drupal\Core\Field\StorageFieldDefinitionInterface only. + * \Drupal\Core\Field\FieldStorageDefinitionInterface only. * * @param string $entity_type_id * The entity type ID. Only entity types that implement * \Drupal\Core\Entity\ContentEntityInterface are supported. * - * @return \Drupal\Core\Field\StorageFieldDefinitionInterface[] + * @return \Drupal\Core\Field\FieldStorageDefinitionInterface[] * The array of storage field definitions for the entity type, keyed by * field name. * * @see \Drupal\Core\Field\FieldStorageDefinitionInterface */ - public function getStorageFieldDefinitions($entity_type_id); + public function getFieldStorageDefinitions($entity_type_id); /** * Creates a new access controller instance. diff --git a/core/lib/Drupal/Core/Field/FieldDefinition.php b/core/lib/Drupal/Core/Field/FieldDefinition.php index 732c93f..68e7518 100644 --- a/core/lib/Drupal/Core/Field/FieldDefinition.php +++ b/core/lib/Drupal/Core/Field/FieldDefinition.php @@ -76,12 +76,12 @@ public static function create($type) { * definition in places where a full field definition is required; e.g., with * widgets or formatters. * - * @param StorageFieldDefinitionInterface $definition + * @param FieldStorageDefinitionInterface $definition * The field storage definition to base the new field definition upon. * * @return $this */ - public static function createFromFieldStorageDefinition(StorageFieldDefinitionInterface $definition) { + public static function createFromFieldStorageDefinition(FieldStorageDefinitionInterface $definition) { return static::create($definition->getType()) ->setCardinality($definition->getCardinality()) ->setConstraints($definition->getConstraints()) diff --git a/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php b/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php index a15d255..83ae5d9 100644 --- a/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php +++ b/core/lib/Drupal/Core/Field/FieldDefinitionInterface.php @@ -52,7 +52,7 @@ * based on that abstract definition, even though that abstract definition can * differ from the concrete definition of any particular node's body field. */ -interface FieldDefinitionInterface extends StorageFieldDefinitionInterface, ListDataDefinitionInterface { +interface FieldDefinitionInterface extends FieldStorageDefinitionInterface, ListDataDefinitionInterface { /** * Returns whether the display for the field can be configured. diff --git a/core/lib/Drupal/Core/Field/FieldItemInterface.php b/core/lib/Drupal/Core/Field/FieldItemInterface.php index 0a15232..d10790d 100644 --- a/core/lib/Drupal/Core/Field/FieldItemInterface.php +++ b/core/lib/Drupal/Core/Field/FieldItemInterface.php @@ -32,7 +32,7 @@ * * @see \Drupal\Core\Field\FieldDefinition */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition); + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition); /** * Returns the name of the main property, if any. @@ -57,7 +57,7 @@ public static function mainPropertyName(); * * Computed fields having no schema should return an empty array. * - * @param \Drupal\Core\Field\StorageFieldDefinitionInterface $field_definition + * @param \Drupal\Core\Field\FieldStorageDefinitionInterface $field_definition * The field definition. * * @return array @@ -81,7 +81,7 @@ public static function mainPropertyName(); * specify another field as related, only existing SQL tables, * such as {taxonomy_term_data}. */ - public static function schema(StorageFieldDefinitionInterface $field_definition); + public static function schema(FieldStorageDefinitionInterface $field_definition); /** * Gets the entity that field belongs to. diff --git a/core/lib/Drupal/Core/Field/StorageFieldDefinitionInterface.php b/core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php similarity index 98% rename from core/lib/Drupal/Core/Field/StorageFieldDefinitionInterface.php rename to core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php index 7a211a0..f656e90 100644 --- a/core/lib/Drupal/Core/Field/StorageFieldDefinitionInterface.php +++ b/core/lib/Drupal/Core/Field/FieldStorageDefinitionInterface.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\Core\Field\StorageFieldDefinitionInterface. + * Contains \Drupal\Core\Field\FieldStorageDefinitionInterface. */ namespace Drupal\Core\Field; @@ -22,9 +22,9 @@ * the label and the description; e.g., any constraints and settings on the * storage field must be present on the bundle field as well. * - * @see hook_entity_storage_field_info() + * @see hook_entity_field_storage_info() */ -interface StorageFieldDefinitionInterface { +interface FieldStorageDefinitionInterface { /** * Value indicating a field accepts an unlimited number of values. diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/BooleanItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/BooleanItem.php index 8440cb4..14d0f83 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/BooleanItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/BooleanItem.php @@ -8,7 +8,7 @@ namespace Drupal\Core\Field\Plugin\Field\FieldType; use Drupal\Core\Field\FieldItemBase; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\TypedData\DataDefinition; /** @@ -26,7 +26,7 @@ class BooleanItem extends FieldItemBase { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('boolean') ->setLabel(t('Boolean value')); @@ -36,7 +36,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DateItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DateItem.php index 004100a..c93d494 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DateItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DateItem.php @@ -8,7 +8,7 @@ namespace Drupal\Core\Field\Plugin\Field\FieldType; use Drupal\Core\Field\FieldItemBase; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\TypedData\DataDefinition; /** @@ -26,7 +26,7 @@ class DateItem extends FieldItemBase { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('date') ->setLabel(t('Date value')); @@ -36,7 +36,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php index a3d6232..30d33c5 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/DecimalItem.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Field\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\TypedData\DataDefinition; /** @@ -37,7 +37,7 @@ public static function defaultSettings() { * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('string') ->setLabel(t('Decimal value')); @@ -47,7 +47,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php index a5ccb48..6e84507 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Field\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Field\FieldItemBase; use Drupal\Core\TypedData\DataDefinition; @@ -27,7 +27,7 @@ class EmailItem extends FieldItemBase { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('email') ->setLabel(t('E-mail value')); @@ -37,7 +37,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php index afdcff3..1697c16 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EntityReferenceItem.php @@ -8,7 +8,7 @@ namespace Drupal\Core\Field\Plugin\Field\FieldType; use Drupal\Core\Entity\TypedData\EntityDataDefinition; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Field\FieldItemBase; use Drupal\Core\TypedData\DataDefinition; use Drupal\Core\TypedData\DataReferenceDefinition; @@ -54,7 +54,7 @@ public static function defaultInstanceSettings() { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $settings = $field_definition->getSettings(); $target_type_info = \Drupal::entityManager()->getDefinition($settings['target_type']); @@ -95,7 +95,7 @@ public static function mainPropertyName() { /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { $target_type = $field_definition->getSetting('target_type'); $target_type_info = \Drupal::entityManager()->getDefinition($target_type); diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/FloatItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/FloatItem.php index 53f0a4a..a78ebdb 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/FloatItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/FloatItem.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Field\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\TypedData\DataDefinition; /** @@ -26,7 +26,7 @@ class FloatItem extends NumericItemBase { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('float') ->setLabel(t('Float value')); @@ -36,7 +36,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/IntegerItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/IntegerItem.php index ebab4e1..2bafa8b 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/IntegerItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/IntegerItem.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Field\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\TypedData\DataDefinition; /** @@ -47,7 +47,7 @@ public static function defaultInstanceSettings() { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('integer') ->setLabel(t('Integer value')); @@ -83,7 +83,7 @@ public function getConstraints() { /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/LanguageItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/LanguageItem.php index f61935a..e3192b2 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/LanguageItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/LanguageItem.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Field\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Field\FieldItemBase; use Drupal\Core\Language\Language; use Drupal\Core\TypedData\DataDefinition; @@ -33,7 +33,7 @@ class LanguageItem extends FieldItemBase { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('string') ->setLabel(t('Language code')); @@ -50,7 +50,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/MapItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/MapItem.php index 3a208eb..26cdc41 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/MapItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/MapItem.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Field\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Field\FieldItemBase; use Drupal\Core\TypedData\DataDefinition; @@ -26,7 +26,7 @@ class MapItem extends FieldItemBase { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('string') ->setLabel(t('Serialized values')); @@ -36,7 +36,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StringItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StringItem.php index 9b947d5..fe7c4f4 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StringItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StringItem.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Field\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Field\FieldItemBase; use Drupal\Core\TypedData\DataDefinition; @@ -37,7 +37,7 @@ public static function defaultSettings() { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('string') ->setLabel(t('Text value')); @@ -47,7 +47,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StringLongItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StringLongItem.php index dc8b905..6337c12 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StringLongItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StringLongItem.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Field\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; /** * Defines the 'string_long' field type. @@ -24,7 +24,7 @@ class StringLongItem extends StringItem { /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/TimestampItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/TimestampItem.php index 4d6c345..ba432e3 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/TimestampItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/TimestampItem.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Field\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Field\FieldItemBase; use Drupal\Core\TypedData\DataDefinition; @@ -26,7 +26,7 @@ class TimestampItem extends FieldItemBase { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('timestamp') ->setLabel(t('Timestamp value')); return $properties; @@ -35,7 +35,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/UriItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/UriItem.php index 031b394..693e4ce 100644 --- a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/UriItem.php +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/UriItem.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Field\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\TypedData\DataDefinition; /** @@ -38,7 +38,7 @@ public static function defaultSettings() { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('uri') ->setLabel(t('URI value')); @@ -48,7 +48,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/modules/comment/lib/Drupal/comment/CommentFieldNameItem.php b/core/modules/comment/lib/Drupal/comment/CommentFieldNameItem.php index 5a912c8..94b8587 100644 --- a/core/modules/comment/lib/Drupal/comment/CommentFieldNameItem.php +++ b/core/modules/comment/lib/Drupal/comment/CommentFieldNameItem.php @@ -7,7 +7,7 @@ namespace Drupal\comment; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Field\Plugin\Field\FieldType\StringItem; use Drupal\Core\TypedData\DataDefinition; @@ -19,7 +19,7 @@ class CommentFieldNameItem extends StringItem { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('string') ->setLabel(t('String value')) ->setClass('\Drupal\comment\CommentFieldNameValue') diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldType/CommentItem.php b/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldType/CommentItem.php index 9f67867..dd6e7e8 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldType/CommentItem.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/Field/FieldType/CommentItem.php @@ -7,7 +7,7 @@ namespace Drupal\comment\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\TypedData\DataDefinition; use Drupal\Core\Field\FieldItemBase; use Drupal\Core\Session\AnonymousUserSession; @@ -51,7 +51,7 @@ public static function defaultInstanceSettings() { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['status'] = DataDefinition::create('integer') ->setLabel(t('Comment status value')); @@ -79,7 +79,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'status' => array( diff --git a/core/modules/datetime/lib/Drupal/datetime/Plugin/Field/FieldType/DateTimeItem.php b/core/modules/datetime/lib/Drupal/datetime/Plugin/Field/FieldType/DateTimeItem.php index 3fc5f39..d347815 100644 --- a/core/modules/datetime/lib/Drupal/datetime/Plugin/Field/FieldType/DateTimeItem.php +++ b/core/modules/datetime/lib/Drupal/datetime/Plugin/Field/FieldType/DateTimeItem.php @@ -7,7 +7,7 @@ namespace Drupal\datetime\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Field\PrepareCacheInterface; use Drupal\Core\TypedData\DataDefinition; use Drupal\Core\Field\FieldItemBase; @@ -48,7 +48,7 @@ public static function defaultSettings() { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('datetime_iso8601') ->setLabel(t('Date value')); @@ -65,7 +65,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/ConfigurableEntityReferenceItem.php b/core/modules/entity_reference/lib/Drupal/entity_reference/ConfigurableEntityReferenceItem.php index ad8b94b..12dc639 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/ConfigurableEntityReferenceItem.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/ConfigurableEntityReferenceItem.php @@ -8,7 +8,7 @@ namespace Drupal\entity_reference; use Drupal\Component\Utility\String; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem; use Drupal\Core\Session\AccountInterface; use Drupal\Core\TypedData\AllowedValuesInterface; @@ -97,7 +97,7 @@ public function getSettableOptions(AccountInterface $account = NULL) { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $settings = $field_definition->getSettings(); $target_type = $settings['target_type']; @@ -136,7 +136,7 @@ public function getConstraints() { /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { $schema = parent::schema($field_definition); $target_type = $field_definition->getSetting('target_type'); diff --git a/core/modules/field/field.module b/core/modules/field/field.module index 35bafb7..8a3ae72 100644 --- a/core/modules/field/field.module +++ b/core/modules/field/field.module @@ -174,9 +174,9 @@ function field_system_info_alter(&$info, Extension $file, $type) { } /** - * Implements hook_entity_storage_field_info(). + * Implements hook_entity_field_storage_info(). */ -function field_entity_storage_field_info(\Drupal\Core\Entity\EntityTypeInterface $entity_type) { +function field_entity_field_storage_info(\Drupal\Core\Entity\EntityTypeInterface $entity_type) { // Expose storage fields for all exposed bundle fields. if ($entity_type->isFieldable()) { return Field::fieldInfo()->getFields(); diff --git a/core/modules/field/lib/Drupal/field/FieldConfigInterface.php b/core/modules/field/lib/Drupal/field/FieldConfigInterface.php index 785605e..c6575ec 100644 --- a/core/modules/field/lib/Drupal/field/FieldConfigInterface.php +++ b/core/modules/field/lib/Drupal/field/FieldConfigInterface.php @@ -8,12 +8,12 @@ namespace Drupal\field; use Drupal\Core\Config\Entity\ConfigEntityInterface; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; /** * Provides an interface defining a field entity. */ -interface FieldConfigInterface extends ConfigEntityInterface, StorageFieldDefinitionInterface { +interface FieldConfigInterface extends ConfigEntityInterface, FieldStorageDefinitionInterface { /** * Returns the list of bundles where the field has instances. diff --git a/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php b/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php index a042892..030bd50 100644 --- a/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php +++ b/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php @@ -146,8 +146,8 @@ public static function create(ContainerInterface $container, array $configuratio public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) { parent::init($view, $display, $options); - $storage_field_definition = FieldHelper::fieldInfo()->getField($this->definition['entity_type'], $this->definition['field_name']); - $this->field_info = FieldDefinition::createFromFieldStorageDefinition($storage_field_definition); + $field_storage_definition = FieldHelper::fieldInfo()->getField($this->definition['entity_type'], $this->definition['field_name']); + $this->field_info = FieldDefinition::createFromFieldStorageDefinition($field_storage_definition); $this->multiple = FALSE; $this->limit_values = FALSE; diff --git a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Field/FieldType/HiddenTestItem.php b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Field/FieldType/HiddenTestItem.php index b50c661..b145abe 100644 --- a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Field/FieldType/HiddenTestItem.php +++ b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Field/FieldType/HiddenTestItem.php @@ -7,7 +7,7 @@ namespace Drupal\field_test\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\TypedData\DataDefinition; /** @@ -27,7 +27,7 @@ class HiddenTestItem extends TestItem { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('integer') ->setLabel(t('Test integer value')); diff --git a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Field/FieldType/ShapeItem.php b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Field/FieldType/ShapeItem.php index 42608df..87a7f31 100644 --- a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Field/FieldType/ShapeItem.php +++ b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Field/FieldType/ShapeItem.php @@ -7,7 +7,7 @@ namespace Drupal\field_test\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\TypedData\DataDefinition; use Drupal\Core\Field\FieldItemBase; @@ -36,7 +36,7 @@ public static function defaultSettings() { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['shape'] = DataDefinition::create('string') ->setLabel(t('Shape')); @@ -49,7 +49,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { $foreign_keys = array(); // The 'foreign keys' key is not always used in tests. if ($field_definition->getSetting('foreign_key_name')) { diff --git a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Field/FieldType/TestItem.php b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Field/FieldType/TestItem.php index 5fe2dd4..fcc599c 100644 --- a/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Field/FieldType/TestItem.php +++ b/core/modules/field/tests/modules/field_test/lib/Drupal/field_test/Plugin/Field/FieldType/TestItem.php @@ -7,7 +7,7 @@ namespace Drupal\field_test\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Field\PrepareCacheInterface; use Drupal\Core\TypedData\DataDefinition; use Drupal\Core\Field\FieldItemBase; @@ -49,7 +49,7 @@ public static function defaultInstanceSettings() { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('integer') ->setLabel(t('Test integer value')); @@ -59,7 +59,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/modules/file/lib/Drupal/file/Plugin/Field/FieldType/FileItem.php b/core/modules/file/lib/Drupal/file/Plugin/Field/FieldType/FileItem.php index 4342754..16ada1e 100644 --- a/core/modules/file/lib/Drupal/file/Plugin/Field/FieldType/FileItem.php +++ b/core/modules/file/lib/Drupal/file/Plugin/Field/FieldType/FileItem.php @@ -7,7 +7,7 @@ namespace Drupal\file\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem; use Drupal\Core\TypedData\DataDefinition; @@ -52,7 +52,7 @@ public static function defaultInstanceSettings() { /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'target_id' => array( @@ -90,7 +90,7 @@ public static function schema(StorageFieldDefinitionInterface $field_definition) /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties = parent::propertyDefinitions($field_definition); $properties['display'] = DataDefinition::create('boolean') diff --git a/core/modules/image/lib/Drupal/image/Plugin/Field/FieldType/ImageItem.php b/core/modules/image/lib/Drupal/image/Plugin/Field/FieldType/ImageItem.php index a3fd414..249933e 100644 --- a/core/modules/image/lib/Drupal/image/Plugin/Field/FieldType/ImageItem.php +++ b/core/modules/image/lib/Drupal/image/Plugin/Field/FieldType/ImageItem.php @@ -7,7 +7,7 @@ namespace Drupal\image\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\TypedData\DataDefinition; use Drupal\file\Plugin\Field\FieldType\FileItem; @@ -84,7 +84,7 @@ public static function defaultInstanceSettings() { /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'target_id' => array( @@ -131,7 +131,7 @@ public static function schema(StorageFieldDefinitionInterface $field_definition) /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties = parent::propertyDefinitions($field_definition); $properties['alt'] = DataDefinition::create('string') diff --git a/core/modules/link/lib/Drupal/link/Plugin/Field/FieldType/LinkItem.php b/core/modules/link/lib/Drupal/link/Plugin/Field/FieldType/LinkItem.php index 30b309c..850c19e 100644 --- a/core/modules/link/lib/Drupal/link/Plugin/Field/FieldType/LinkItem.php +++ b/core/modules/link/lib/Drupal/link/Plugin/Field/FieldType/LinkItem.php @@ -8,7 +8,7 @@ namespace Drupal\link\Plugin\Field\FieldType; use Drupal\Core\Field\FieldItemBase; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\TypedData\DataDefinition; use Drupal\Core\TypedData\MapDataDefinition; use Drupal\link\LinkItemInterface; @@ -40,7 +40,7 @@ public static function defaultInstanceSettings() { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['url'] = DataDefinition::create('string') ->setLabel(t('URL')); @@ -62,7 +62,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'url' => array( diff --git a/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListBooleanItem.php b/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListBooleanItem.php index 7503a5d..095c89c 100644 --- a/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListBooleanItem.php +++ b/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListBooleanItem.php @@ -8,7 +8,7 @@ namespace Drupal\options\Plugin\Field\FieldType; use Drupal\Component\Utility\NestedArray; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Field\FieldItemBase; use Drupal\Core\Session\AccountInterface; use Drupal\Core\TypedData\AllowedValuesInterface; @@ -68,7 +68,7 @@ public function getSettableOptions(AccountInterface $account = NULL) { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('boolean') ->setLabel(t('Boolean value')); @@ -78,7 +78,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListFloatItem.php b/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListFloatItem.php index 5218429..30cd382 100644 --- a/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListFloatItem.php +++ b/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListFloatItem.php @@ -7,7 +7,7 @@ namespace Drupal\options\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\TypedData\DataDefinition; /** @@ -26,7 +26,7 @@ class ListFloatItem extends ListItemBase { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('float') ->setLabel(t('Float value')); @@ -36,7 +36,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListIntegerItem.php b/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListIntegerItem.php index 3fc61fc..c049878 100644 --- a/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListIntegerItem.php +++ b/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListIntegerItem.php @@ -7,7 +7,7 @@ namespace Drupal\options\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\TypedData\DataDefinition; /** @@ -26,7 +26,7 @@ class ListIntegerItem extends ListItemBase { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('integer') ->setLabel(t('Integer value')); @@ -36,7 +36,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListTextItem.php b/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListTextItem.php index ae57778..1cf34b4 100644 --- a/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListTextItem.php +++ b/core/modules/options/lib/Drupal/options/Plugin/Field/FieldType/ListTextItem.php @@ -7,7 +7,7 @@ namespace Drupal\options\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\TypedData\DataDefinition; /** @@ -26,7 +26,7 @@ class ListTextItem extends ListItemBase { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('string') ->setLabel(t('Text value')) ->addConstraint('Length', array('max' => 255)); @@ -37,7 +37,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/modules/path/lib/Drupal/path/Plugin/Field/FieldType/PathItem.php b/core/modules/path/lib/Drupal/path/Plugin/Field/FieldType/PathItem.php index eeab236..1150c99 100644 --- a/core/modules/path/lib/Drupal/path/Plugin/Field/FieldType/PathItem.php +++ b/core/modules/path/lib/Drupal/path/Plugin/Field/FieldType/PathItem.php @@ -7,7 +7,7 @@ namespace Drupal\path\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Field\FieldItemBase; use Drupal\Core\TypedData\DataDefinition; @@ -26,7 +26,7 @@ class PathItem extends FieldItemBase { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['alias'] = DataDefinition::create('string') ->setLabel(t('Path alias')); $properties['pid'] = DataDefinition::create('string') @@ -37,7 +37,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array(); } diff --git a/core/modules/shortcut/lib/Drupal/shortcut/ShortcutPathItem.php b/core/modules/shortcut/lib/Drupal/shortcut/ShortcutPathItem.php index 82634f7..8ad82d3 100644 --- a/core/modules/shortcut/lib/Drupal/shortcut/ShortcutPathItem.php +++ b/core/modules/shortcut/lib/Drupal/shortcut/ShortcutPathItem.php @@ -7,7 +7,7 @@ namespace Drupal\shortcut; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Field\Plugin\Field\FieldType\StringItem; use Drupal\Core\TypedData\DataDefinition; @@ -19,7 +19,7 @@ class ShortcutPathItem extends StringItem { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('string') ->setLabel(t('String value')) ->setComputed(TRUE) diff --git a/core/modules/system/entity.api.php b/core/modules/system/entity.api.php index 304c8e8..0337ef2 100644 --- a/core/modules/system/entity.api.php +++ b/core/modules/system/entity.api.php @@ -708,7 +708,7 @@ function hook_entity_base_field_info_alter(&$fields, \Drupal\Core\Entity\EntityT * Provides field definitions for a specific bundle within an entity type. * * Bundle fields either have to override an existing base field, or need to - * provide a storage field via hook_entity_storage_field_info() unless they are + * provide a storage field via hook_entity_field_storage_info() unless they are * computed. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type @@ -723,8 +723,8 @@ function hook_entity_base_field_info_alter(&$fields, \Drupal\Core\Entity\EntityT * * @see hook_entity_base_field_info() * @see hook_entity_base_field_info_alter() - * @see hook_entity_storage_field_info() - * @see hook_entity_storage_field_info_alter() + * @see hook_entity_field_storage_info() + * @see hook_entity_field_storage_info_alter() * @see hook_entity_bundle_field_info_alter() * @see \Drupal\Core\Field\FieldDefinitionInterface * @see \Drupal\Core\Entity\EntityManagerInterface::getFieldDefinitions() @@ -768,14 +768,14 @@ function hook_entity_bundle_field_info_alter(&$fields, \Drupal\Core\Entity\Entit * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. * - * @return \Drupal\Core\Field\StorageFieldDefinitionInterface[] + * @return \Drupal\Core\Field\FieldStorageDefinitionInterface[] * An array of storage field definitions, keyed by field name. * - * @see hook_entity_storage_field_info_alter() + * @see hook_entity_field_storage_info_alter() * @see \Drupal\Core\Field\FieldStorageDefinitionInterface - * @see \Drupal\Core\Entity\EntityManagerInterface::getStorageFieldDefinitions() + * @see \Drupal\Core\Entity\EntityManagerInterface::getFieldStorageDefinitions() */ -function hook_entity_storage_field_info(\Drupal\Core\Entity\EntityTypeInterface $entity_type) { +function hook_entity_field_storage_info(\Drupal\Core\Entity\EntityTypeInterface $entity_type) { // Expose storage fields for all exposed bundle fields. if ($entity_type->isFieldable()) { return Field::fieldInfo()->getFields(); @@ -785,14 +785,14 @@ function hook_entity_storage_field_info(\Drupal\Core\Entity\EntityTypeInterface /** * Alters storage field definitions for a content entity type. * - * @param \Drupal\Core\Field\StorageFieldDefinitionInterface[] $fields + * @param \Drupal\Core\Field\FieldStorageDefinitionInterface[] $fields * The array of storage field definitions for the entity type. * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. * - * @see hook_entity_storage_field_info() + * @see hook_entity_field_storage_info() */ -function hook_entity_storage_field_info_alter(&$fields, \Drupal\Core\Entity\EntityTypeInterface $entity_type) { +function hook_entity_field_storage_info_alter(&$fields, \Drupal\Core\Entity\EntityTypeInterface $entity_type) { // Alter the max_length setting. if ($entity_type->id() == 'node' && !empty($fields['mymodule_text'])) { $fields['mymodule_text']->setSetting('max_length', 128); diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Field/FieldType/TaxonomyTermReferenceItem.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Field/FieldType/TaxonomyTermReferenceItem.php index 9a444c8..a893063 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Field/FieldType/TaxonomyTermReferenceItem.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Field/FieldType/TaxonomyTermReferenceItem.php @@ -7,7 +7,7 @@ namespace Drupal\taxonomy\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem; use Drupal\Core\Session\AccountInterface; use Drupal\Core\TypedData\AllowedValuesInterface; @@ -94,7 +94,7 @@ public function getSettableOptions(AccountInterface $account = NULL) { /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'target_id' => array( diff --git a/core/modules/telephone/lib/Drupal/telephone/Plugin/Field/FieldType/TelephoneItem.php b/core/modules/telephone/lib/Drupal/telephone/Plugin/Field/FieldType/TelephoneItem.php index c9a8268..2b1a5b6 100644 --- a/core/modules/telephone/lib/Drupal/telephone/Plugin/Field/FieldType/TelephoneItem.php +++ b/core/modules/telephone/lib/Drupal/telephone/Plugin/Field/FieldType/TelephoneItem.php @@ -8,7 +8,7 @@ namespace Drupal\telephone\Plugin\Field\FieldType; use Drupal\Core\Field\FieldItemBase; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\TypedData\DataDefinition; /** @@ -27,7 +27,7 @@ class TelephoneItem extends FieldItemBase { /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( @@ -42,7 +42,7 @@ public static function schema(StorageFieldDefinitionInterface $field_definition) /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('string') ->setLabel(t('Telephone number')); diff --git a/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextItem.php b/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextItem.php index 1a6eba2..b2ba0a1 100644 --- a/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextItem.php +++ b/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextItem.php @@ -7,7 +7,7 @@ namespace Drupal\text\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; /** * Plugin implementation of the 'text' field type. @@ -34,7 +34,7 @@ public static function defaultSettings() { /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextItemBase.php b/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextItemBase.php index fb2d8de..4f2deca 100644 --- a/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextItemBase.php +++ b/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextItemBase.php @@ -8,7 +8,7 @@ namespace Drupal\text\Plugin\Field\FieldType; use Drupal\Core\Field\FieldItemBase; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\Field\PrepareCacheInterface; use Drupal\Core\TypedData\DataDefinition; @@ -29,7 +29,7 @@ public static function defaultInstanceSettings() { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties['value'] = DataDefinition::create('string') ->setLabel(t('Text value')); diff --git a/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextLongItem.php b/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextLongItem.php index db2f8d6..367ae19 100644 --- a/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextLongItem.php +++ b/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextLongItem.php @@ -7,7 +7,7 @@ namespace Drupal\text\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; /** * Plugin implementation of the 'text_long' field type. @@ -25,7 +25,7 @@ class TextLongItem extends TextItemBase { /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextWithSummaryItem.php b/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextWithSummaryItem.php index ae8cb0e..0d686e0 100644 --- a/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextWithSummaryItem.php +++ b/core/modules/text/lib/Drupal/text/Plugin/Field/FieldType/TextWithSummaryItem.php @@ -7,7 +7,7 @@ namespace Drupal\text\Plugin\Field\FieldType; -use Drupal\Core\Field\StorageFieldDefinitionInterface; +use Drupal\Core\Field\FieldStorageDefinitionInterface; use Drupal\Core\TypedData\DataDefinition; /** @@ -36,7 +36,7 @@ public static function defaultInstanceSettings() { /** * {@inheritdoc} */ - public static function propertyDefinitions(StorageFieldDefinitionInterface $field_definition) { + public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties = parent::propertyDefinitions($field_definition); $properties['summary'] = DataDefinition::create('string') @@ -55,7 +55,7 @@ public static function propertyDefinitions(StorageFieldDefinitionInterface $fiel /** * {@inheritdoc} */ - public static function schema(StorageFieldDefinitionInterface $field_definition) { + public static function schema(FieldStorageDefinitionInterface $field_definition) { return array( 'columns' => array( 'value' => array( diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php index 4fe8000..5e59cad 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php @@ -476,16 +476,16 @@ public function testGetFieldDefinitions() { } /** - * Tests the getStorageFieldDefinitions() method. + * Tests the getFieldStorageDefinitions() method. * - * @covers ::getStorageFieldDefinitions() + * @covers ::getFieldStorageDefinitions() */ - public function testGetStorageFieldDefinitions() { + public function testGetFieldStorageDefinitions() { $field_definition = $this->setUpEntityWithFieldDefinition(TRUE); - $storage_field_definition = $this->getMock('\Drupal\Core\Field\FieldStorageDefinitionInterface'); - $storage_field_definition->expects($this->any()) + $field_storage_definition = $this->getMock('\Drupal\Core\Field\FieldStorageDefinitionInterface'); + $field_storage_definition->expects($this->any()) ->method('getName') - ->will($this->returnValue('storage_field')); + ->will($this->returnValue('field_storage')); $this->moduleHandler->expects($this->at(0)) ->method('getImplementations') @@ -494,19 +494,19 @@ public function testGetStorageFieldDefinitions() { $this->moduleHandler->expects($this->at(2)) ->method('getImplementations') - ->with('entity_storage_field_info') + ->with('entity_field_storage_info') ->will($this->returnValue(array('example_module'))); $this->moduleHandler->expects($this->any()) ->method('invoke') - ->with('example_module', 'entity_storage_field_info') - ->will($this->returnValue(array('storage_field' => $storage_field_definition))); + ->with('example_module', 'entity_field_storage_info') + ->will($this->returnValue(array('field_storage' => $field_storage_definition))); $expected = array( 'id' => $field_definition, - 'storage_field' => $storage_field_definition, + 'field_storage' => $field_storage_definition, ); - $this->assertSame($expected, $this->entityManager->getStorageFieldDefinitions('test_entity_type')); + $this->assertSame($expected, $this->entityManager->getFieldStorageDefinitions('test_entity_type')); } /** @@ -570,30 +570,30 @@ public function testGetFieldDefinitionsWithCaching() { } /** - * Tests the getStorageFieldDefinitions() method with caching. + * Tests the getFieldStorageDefinitions() method with caching. * - * @covers ::getStorageFieldDefinitions() + * @covers ::getFieldStorageDefinitions() */ - public function testGetStorageFieldDefinitionsWithCaching() { + public function testGetFieldStorageDefinitionsWithCaching() { $field_definition = $this->setUpEntityWithFieldDefinition(TRUE, 'id', 0); - $storage_field_definition = $this->getMock('\Drupal\Core\Field\FieldStorageDefinitionInterface'); - $storage_field_definition->expects($this->any()) + $field_storage_definition = $this->getMock('\Drupal\Core\Field\FieldStorageDefinitionInterface'); + $field_storage_definition->expects($this->any()) ->method('getName') - ->will($this->returnValue('storage_field')); + ->will($this->returnValue('field_storage')); $this->moduleHandler->expects($this->any()) ->method('getImplementations') - ->with('entity_storage_field_info') + ->with('entity_field_storage_info') ->will($this->returnValue(array('example_module'))); $this->moduleHandler->expects($this->once()) ->method('invoke') ->with('example_module') - ->will($this->returnValue(array('storage_field' => $storage_field_definition))); + ->will($this->returnValue(array('field_storage' => $field_storage_definition))); $expected = array( 'id' => $field_definition, - 'storage_field' => $storage_field_definition, + 'field_storage' => $field_storage_definition, ); $this->cache->expects($this->at(0)) @@ -602,7 +602,7 @@ public function testGetStorageFieldDefinitionsWithCaching() { ->will($this->returnValue((object) array('data' => array('id' => $expected['id'])))); $this->cache->expects($this->at(1)) ->method('get') - ->with('entity_storage_field_definitions:test_entity_type:en', FALSE) + ->with('entity_field_storage_definitions:test_entity_type:en', FALSE) ->will($this->returnValue(FALSE)); $this->cache->expects($this->at(2)) ->method('set'); @@ -612,12 +612,12 @@ public function testGetStorageFieldDefinitionsWithCaching() { ->will($this->returnValue((object) array('data' => array('id' => $expected['id'])))); $this->cache->expects($this->at(4)) ->method('get') - ->with('entity_storage_field_definitions:test_entity_type:en', FALSE) + ->with('entity_field_storage_definitions:test_entity_type:en', FALSE) ->will($this->returnValue((object) array('data' => $expected))); - $this->assertSame($expected, $this->entityManager->getStorageFieldDefinitions('test_entity_type')); + $this->assertSame($expected, $this->entityManager->getFieldStorageDefinitions('test_entity_type')); $this->entityManager->testClearEntityFieldInfo(); - $this->assertSame($expected, $this->entityManager->getStorageFieldDefinitions('test_entity_type')); + $this->assertSame($expected, $this->entityManager->getFieldStorageDefinitions('test_entity_type')); } /** @@ -993,7 +993,7 @@ public function setDiscovery(DiscoveryInterface $discovery) { public function testClearEntityFieldInfo() { $this->baseFieldDefinitions = array(); $this->fieldDefinitions = array(); - $this->storageFieldDefinitions = array(); + $this->fieldStorageDefinitions = array(); } }