diff --git a/core/includes/entity.inc b/core/includes/entity.inc index d3cbe15..d658bb7 100644 --- a/core/includes/entity.inc +++ b/core/includes/entity.inc @@ -138,7 +138,7 @@ function entity_get_view_modes($entity_type_id = NULL) { * * @see \Drupal\Core\Entity\EntityManagerInterface * @see \Drupal\Core\Entity\EntityStorageInterface - * @see \Drupal\Core\Entity\DatabaseEntityStorage + * @see \Drupal\Core\Entity\ContentEntityDatabaseStorage * @see \Drupal\Core\Entity\Query\QueryInterface */ function entity_load($entity_type, $id, $reset = FALSE) { @@ -163,7 +163,7 @@ function entity_load($entity_type, $id, $reset = FALSE) { * * @see \Drupal\Core\Entity\EntityManagerInterface * @see \Drupal\Core\Entity\EntityStorageInterface - * @see \Drupal\Core\Entity\DatabaseEntityStorage + * @see \Drupal\Core\Entity\ContentEntityDatabaseStorage */ function entity_revision_load($entity_type, $revision_id) { return \Drupal::entityManager() @@ -229,12 +229,13 @@ function entity_load_by_uuid($entity_type_id, $uuid, $reset = FALSE) { * * The actual loading is done through a class that has to implement the * Drupal\Core\Entity\EntityStorageInterface interface. By default, - * Drupal\Core\Entity\DatabaseEntityStorage is used. Entity types can - * specify that a different class should be used by setting the + * Drupal\Core\Entity\ContentEntityDatabaseStorage is used for content entities + * and Drupal\Core\Config\Entity\ConfigEntityStorage for config entities. Entity + * types can specify that a different class should be used by setting the * "controllers['storage']" key in the entity plugin annotation. These classes * can either implement the Drupal\Core\Entity\EntityStorageInterface * interface, or, most commonly, extend the - * Drupal\Core\Entity\DatabaseEntityStorage class. + * Drupal\Core\Entity\ContentEntityDatabaseStorage class. * See Drupal\node\Entity\Node and Drupal\node\NodeStorage * for an example. * @@ -250,7 +251,7 @@ function entity_load_by_uuid($entity_type_id, $uuid, $reset = FALSE) { * * @see \Drupal\Core\Entity\EntityManagerInterface * @see \Drupal\Core\Entity\EntityStorageInterface - * @see \Drupal\Core\Entity\DatabaseEntityStorage + * @see \Drupal\Core\Entity\ContentEntityDatabaseStorage * @see \Drupal\Core\Entity\Query\QueryInterface */ function entity_load_multiple($entity_type, array $ids = NULL, $reset = FALSE) { diff --git a/core/lib/Drupal/Core/Entity/FieldableDatabaseEntityStorage.php b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php similarity index 99% rename from core/lib/Drupal/Core/Entity/FieldableDatabaseEntityStorage.php rename to core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php index c9918b9..6b7de03 100644 --- a/core/lib/Drupal/Core/Entity/FieldableDatabaseEntityStorage.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\Core\Entity\DatabaseEntityStorage. + * Contains \Drupal\Core\Entity\ContentEntityDatabaseStorage. */ namespace Drupal\Core\Entity; @@ -25,7 +25,7 @@ * This class can be used as-is by most simple entity types. Entity types * requiring special handling can extend the class. */ -class FieldableDatabaseEntityStorage extends FieldableEntityStorageBase { +class ContentEntityDatabaseStorage extends ContentEntityStorageBase { /** * Name of entity's revision database table field, if it supports revisions. @@ -90,7 +90,7 @@ public static function createInstance(ContainerInterface $container, EntityTypeI } /** - * Constructs a DatabaseEntityStorage object. + * Constructs a ContentEntityDatabaseStorage object. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. diff --git a/core/lib/Drupal/Core/Entity/ContentEntityType.php b/core/lib/Drupal/Core/Entity/ContentEntityType.php index 12e58f6..510182c 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityType.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityType.php @@ -17,7 +17,7 @@ class ContentEntityType extends EntityType { */ public function getControllerClasses() { return parent::getControllerClasses() + array( - 'storage' => 'Drupal\Core\Entity\FieldableDatabaseEntityStorage', + 'storage' => 'Drupal\Core\Entity\ContentEntityDatabaseStorage', ); } diff --git a/core/lib/Drupal/Core/Entity/DatabaseEntityStorage.php b/core/lib/Drupal/Core/Entity/EntityDatabaseStorage.php similarity index 98% rename from core/lib/Drupal/Core/Entity/DatabaseEntityStorage.php rename to core/lib/Drupal/Core/Entity/EntityDatabaseStorage.php index e296f82..c25ff56 100644 --- a/core/lib/Drupal/Core/Entity/DatabaseEntityStorage.php +++ b/core/lib/Drupal/Core/Entity/EntityDatabaseStorage.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\Core\Entity\DatabaseEntityStorage. + * Contains \Drupal\Core\Entity\EntityDatabaseStorage. */ namespace Drupal\Core\Entity; @@ -26,7 +26,7 @@ * * This class only supports bare, non-content entities. */ -class DatabaseEntityStorage extends EntityStorageBase { +class EntityDatabaseStorage extends EntityStorageBase { /** * The UUID service. @@ -68,7 +68,7 @@ public static function createInstance(ContainerInterface $container, EntityTypeI } /** - * Constructs a DatabaseEntityStorage object. + * Constructs a EntityDatabaseStorage object. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. diff --git a/core/lib/Drupal/Core/Entity/EntityStorageInterface.php b/core/lib/Drupal/Core/Entity/EntityStorageInterface.php index 47af56a..0406a5e 100644 --- a/core/lib/Drupal/Core/Entity/EntityStorageInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityStorageInterface.php @@ -8,14 +8,14 @@ namespace Drupal\Core\Entity; /** - * Defines a common interface for entity controller classes. + * Defines a common interface for entity storage classes. * * All entity controller classes specified via the "controllers['storage']" key * returned by \Drupal\Core\Entity\EntityManagerInterface or * hook_entity_type_alter() have to implement this interface. * * Most simple, SQL-based entity controllers will do better by extending - * Drupal\Core\Entity\DatabaseEntityStorage instead of implementing this + * Drupal\Core\Entity\ContentEntityDatabaseStorage instead of implementing this * interface directly. */ interface EntityStorageInterface { diff --git a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php index 338dc79..17d9555 100644 --- a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php @@ -136,7 +136,7 @@ public function isRenderCacheable(); /** * Indicates if the persistent cache of field data should be used. * - * @todo Used by FieldableEntityStorageBase only. + * @todo Used by ContentEntityStorageBase only. * * The persistent cache should usually only be disabled if a higher level * persistent cache is available for the entity type. @@ -514,7 +514,7 @@ public function getBundleLabel(); /** * Returns the name of the entity's base table. * - * @todo Used by DatabaseEntityStorage only. + * @todo Used by ContentEntityDatabaseStorage only. * * @return string|bool * The name of the entity's base table, or FALSE if none exists. @@ -544,7 +544,7 @@ public function getConfigPrefix(); /** * Returns the name of the entity's revision data table. * - * @todo Used by FieldableDatabaseEntityStorage only. + * @todo Used by ContentEntityDatabaseStorage only. * * @return string|bool * The name of the entity type's revision data table. @@ -554,7 +554,7 @@ public function getRevisionDataTable(); /** * Returns the name of the entity's revision table. * - * @todo Used by FieldableDatabaseEntityStorage only. + * @todo Used by ContentEntityDatabaseStorage only. * * @return string|bool * The name of the entity type's revision table. @@ -564,7 +564,7 @@ public function getRevisionTable(); /** * Returns the name of the entity's data table. * - * @todo Used by FieldableDatabaseEntityStorage only. + * @todo Used by ContentEntityDatabaseStorage only. * * @return string|bool * The name of the entity type's data table. diff --git a/core/lib/Drupal/Core/Entity/FieldableEntityStorageInterface.php b/core/lib/Drupal/Core/Entity/ExtendableEntityStorageInterface.php similarity index 97% rename from core/lib/Drupal/Core/Entity/FieldableEntityStorageInterface.php rename to core/lib/Drupal/Core/Entity/ExtendableEntityStorageInterface.php index dd694e8..b58e0f3 100644 --- a/core/lib/Drupal/Core/Entity/FieldableEntityStorageInterface.php +++ b/core/lib/Drupal/Core/Entity/ExtendableEntityStorageInterface.php @@ -10,7 +10,7 @@ use Drupal\field\FieldConfigInterface; use Drupal\field\FieldInstanceConfigInterface; -interface FieldableEntityStorageInterface extends EntityStorageInterface { +interface ExtendableEntityStorageInterface extends EntityStorageInterface { /** * Allows reaction to the creation of a configurable field. diff --git a/core/lib/Drupal/Core/Entity/FieldableEntityStorageBase.php b/core/lib/Drupal/Core/Entity/FieldableEntityStorageBase.php index fbb82a1..adc5c76 100644 --- a/core/lib/Drupal/Core/Entity/FieldableEntityStorageBase.php +++ b/core/lib/Drupal/Core/Entity/FieldableEntityStorageBase.php @@ -2,7 +2,7 @@ /** * @file - * Contains \Drupal\Core\Entity\FieldableEntityStorageBase. + * Contains \Drupal\Core\Entity\ContentEntityStorageBase. */ namespace Drupal\Core\Entity; @@ -13,7 +13,7 @@ use Drupal\field\FieldInstanceConfigInterface; use Symfony\Component\DependencyInjection\ContainerInterface; -abstract class FieldableEntityStorageBase extends EntityStorageBase implements FieldableEntityStorageInterface { +abstract class ContentEntityStorageBase extends EntityStorageBase implements ExtendableEntityStorageInterface { /** * The entity bundle key. @@ -30,7 +30,7 @@ protected $entityClass; /** - * Constructs a FieldableEntityStorageBase object. + * Constructs a ContentEntityStorageBase object. * * @param \Drupal\Core\Entity\EntityTypeInterface $entity_type * The entity type definition. diff --git a/core/lib/Drupal/Core/Entity/FieldableNullStorage.php b/core/lib/Drupal/Core/Entity/FieldableNullStorage.php index 8e3f72b..e874ff5 100644 --- a/core/lib/Drupal/Core/Entity/FieldableNullStorage.php +++ b/core/lib/Drupal/Core/Entity/FieldableNullStorage.php @@ -15,7 +15,7 @@ * * Used for content entity types that have no storage. */ -class FieldableNullStorage extends FieldableEntityStorageBase { +class FieldableNullStorage extends ContentEntityStorageBase { /** * {@inheritdoc} diff --git a/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php b/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php index 8283b43..ee2bebc 100644 --- a/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php +++ b/core/lib/Drupal/Core/Entity/Query/Sql/Tables.php @@ -9,7 +9,7 @@ use Drupal\Core\Database\Query\SelectInterface; use Drupal\Core\Entity\EntityStorageInterface; -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; use Drupal\Core\Entity\Plugin\DataType\EntityReference; use Drupal\Core\Entity\Query\QueryException; use Drupal\field\Entity\FieldConfig; @@ -163,7 +163,7 @@ public function addField($field, $type, $langcode) { $column = 'value'; } $table = $this->ensureFieldTable($index_prefix, $field, $type, $langcode, $base_table, $entity_id_field, $field_id_field); - $sql_column = FieldableDatabaseEntityStorage::_fieldColumnName($field, $column); + $sql_column = ContentEntityDatabaseStorage::_fieldColumnName($field, $column); } // This is an entity property (non-configurable field). else { @@ -252,7 +252,7 @@ protected function ensureEntityTable($index_prefix, $property, $type, $langcode, protected function ensureFieldTable($index_prefix, &$field, $type, $langcode, $base_table, $entity_id_field, $field_id_field) { $field_name = $field->getName(); if (!isset($this->fieldTables[$index_prefix . $field_name])) { - $table = $this->sqlQuery->getMetaData('age') == EntityStorageInterface::FIELD_LOAD_CURRENT ? FieldableDatabaseEntityStorage::_fieldTableName($field) : FieldableDatabaseEntityStorage::_fieldRevisionTableName($field); + $table = $this->sqlQuery->getMetaData('age') == EntityStorageInterface::FIELD_LOAD_CURRENT ? ContentEntityDatabaseStorage::_fieldTableName($field) : ContentEntityDatabaseStorage::_fieldRevisionTableName($field); if ($field->getCardinality() != 1) { $this->sqlQuery->addMetaData('simple_query', FALSE); } diff --git a/core/modules/aggregator/lib/Drupal/aggregator/FeedStorage.php b/core/modules/aggregator/lib/Drupal/aggregator/FeedStorage.php index 1c089a7..c926063 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/FeedStorage.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/FeedStorage.php @@ -8,15 +8,15 @@ namespace Drupal\aggregator; use Drupal\aggregator\FeedInterface; -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; /** * Controller class for aggregator's feeds. * - * This extends the Drupal\Core\Entity\DatabaseEntityStorage class, adding - * required special handling for feed entities. + * This extends the Drupal\Core\Entity\ContentEntityDatabaseStorage class, + * adding required special handling for feed entities. */ -class FeedStorage extends FieldableDatabaseEntityStorage implements FeedStorageInterface { +class FeedStorage extends ContentEntityDatabaseStorage implements FeedStorageInterface { /** * {@inheritdoc} diff --git a/core/modules/aggregator/lib/Drupal/aggregator/ItemStorage.php b/core/modules/aggregator/lib/Drupal/aggregator/ItemStorage.php index eccf620..393658a 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/ItemStorage.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/ItemStorage.php @@ -10,15 +10,15 @@ use Drupal\aggregator\Entity\Item; use Drupal\Core\Database\Query\PagerSelectExtender; use Drupal\Core\Database\Query\SelectInterface; -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; /** * Controller class for aggregators items. * - * This extends the Drupal\Core\Entity\DatabaseEntityStorage class, adding - * required special handling for feed item entities. + * This extends the Drupal\Core\Entity\ContentEntityDatabaseStorage class, + * adding required special handling for feed item entities. */ -class ItemStorage extends FieldableDatabaseEntityStorage implements ItemStorageInterface { +class ItemStorage extends ContentEntityDatabaseStorage implements ItemStorageInterface { /** * {@inheritdoc} diff --git a/core/modules/comment/lib/Drupal/comment/CommentStorage.php b/core/modules/comment/lib/Drupal/comment/CommentStorage.php index e6c0785..a9f71e9 100644 --- a/core/modules/comment/lib/Drupal/comment/CommentStorage.php +++ b/core/modules/comment/lib/Drupal/comment/CommentStorage.php @@ -12,17 +12,17 @@ use Drupal\Core\Entity\EntityTypeInterface; use Drupal\field\FieldInfo; use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; use Drupal\Core\Entity\EntityChangedInterface; use Drupal\user\EntityOwnerInterface; /** * Defines the controller class for comments. * - * This extends the Drupal\Core\Entity\DatabaseEntityStorage class, adding - * required special handling for comment entities. + * This extends the Drupal\Core\Entity\ContentEntityDatabaseStorage class, + * adding required special handling for comment entities. */ -class CommentStorage extends FieldableDatabaseEntityStorage implements CommentStorageInterface { +class CommentStorage extends ContentEntityDatabaseStorage implements CommentStorageInterface { /** * The comment statistics service. diff --git a/core/modules/contact/lib/Drupal/contact/Tests/Views/ContactFieldsTest.php b/core/modules/contact/lib/Drupal/contact/Tests/Views/ContactFieldsTest.php index 1a43b01..28216aa 100644 --- a/core/modules/contact/lib/Drupal/contact/Tests/Views/ContactFieldsTest.php +++ b/core/modules/contact/lib/Drupal/contact/Tests/Views/ContactFieldsTest.php @@ -7,7 +7,7 @@ namespace Drupal\contact\Tests\Views; -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; use Drupal\views\Tests\ViewTestBase; /** @@ -67,7 +67,7 @@ protected function setUp() { public function testViewsData() { // Test that the field is not exposed to views, since contact_message // entities have no storage. - $table_name = FieldableDatabaseEntityStorage::_fieldTableName($this->field); + $table_name = ContentEntityDatabaseStorage::_fieldTableName($this->field); $data = $this->container->get('views.views_data')->get($table_name); $this->assertFalse($data, 'The field is not exposed to Views.'); } diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationTestBase.php b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationTestBase.php index d839d48..250b10a 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationTestBase.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/Tests/ContentTranslationTestBase.php @@ -7,7 +7,7 @@ namespace Drupal\content_translation\Tests; -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; use Drupal\Core\Language\Language; use Drupal\simpletest\WebTestBase; @@ -218,7 +218,7 @@ protected function createEntity($values, $langcode, $bundle_name = NULL) { $entity_values[$bundle_key] = $bundle_name ?: $this->bundle; } $controller = $this->container->get('entity.manager')->getStorage($this->entityTypeId); - if (!($controller instanceof FieldableDatabaseEntityStorage)) { + if (!($controller instanceof ContentEntityDatabaseStorage)) { foreach ($values as $property => $value) { if (is_array($value)) { $entity_values[$property] = array($langcode => $value); diff --git a/core/modules/field/field.views.inc b/core/modules/field/field.views.inc index 508b0ee..c142163 100644 --- a/core/modules/field/field.views.inc +++ b/core/modules/field/field.views.inc @@ -6,7 +6,7 @@ */ use Drupal\Component\Utility\NestedArray; -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\field\FieldConfigInterface; @@ -63,11 +63,11 @@ function field_views_data_alter(&$data) { * The field definition. * * @return bool - * True if the entity type uses DatabaseEntityStorage. + * True if the entity type uses ContentEntityDatabaseStorage. */ function _field_views_is_sql_entity_type(FieldConfigInterface $field) { $entity_manager = \Drupal::entityManager(); - if ($entity_manager->getDefinition($field->entity_type) && $entity_manager->getStorage($field->entity_type) instanceof FieldableDatabaseEntityStorage) { + if ($entity_manager->getDefinition($field->entity_type) && $entity_manager->getStorage($field->entity_type) instanceof ContentEntityDatabaseStorage) { return TRUE; } } @@ -140,13 +140,13 @@ function field_views_field_default_views_data(FieldConfigInterface $field) { // Description of the field tables. $field_tables = array( EntityStorageInterface::FIELD_LOAD_CURRENT => array( - 'table' => FieldableDatabaseEntityStorage::_fieldTableName($field), + 'table' => ContentEntityDatabaseStorage::_fieldTableName($field), 'alias' => "{$entity_type_id}__{$field_name}", ), ); if ($supports_revisions) { $field_tables[EntityStorageInterface::FIELD_LOAD_REVISION] = array( - 'table' => FieldableDatabaseEntityStorage::_fieldRevisionTableName($field), + 'table' => ContentEntityDatabaseStorage::_fieldRevisionTableName($field), 'alias' => "{$entity_type_id}_revision__{$field_name}", ); } @@ -177,7 +177,7 @@ function field_views_field_default_views_data(FieldConfigInterface $field) { // Build the list of additional fields to add to queries. $add_fields = array('delta', 'langcode', 'bundle'); foreach (array_keys($field_columns) as $column) { - $add_fields[] = FieldableDatabaseEntityStorage::_fieldColumnName($field, $column); + $add_fields[] = ContentEntityDatabaseStorage::_fieldColumnName($field, $column); } // Determine the label to use for the field. We don't have a label available // at the field level, so we just go through all instances and take the one @@ -301,10 +301,10 @@ function field_views_field_default_views_data(FieldConfigInterface $field) { else { $group = t('@group (historical data)', array('@group' => $group_name)); } - $column_real_name = FieldableDatabaseEntityStorage::_fieldColumnName($field, $column); + $column_real_name = ContentEntityDatabaseStorage::_fieldColumnName($field, $column); // Load all the fields from the table by default. - $field_sql_schema = FieldableDatabaseEntityStorage::_fieldSqlSchema($field); + $field_sql_schema = ContentEntityDatabaseStorage::_fieldSqlSchema($field); $additional_fields = array_keys($field_sql_schema[$table]['fields']); $data[$table_alias][$column_real_name] = array( 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 53ddce6..6620e3f 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 @@ -11,7 +11,7 @@ use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\field\Field as FieldHelper; -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; use Drupal\Core\Field\FieldDefinitionInterface; use Drupal\Core\Field\FormatterPluginManager; use Drupal\Core\Language\Language; @@ -309,7 +309,7 @@ public function clickSort($order) { $this->ensureMyTable(); $field = field_info_field($this->definition['entity_type'], $this->definition['field_name']); - $column = FieldableDatabaseEntityStorage::_fieldColumnName($field, $this->options['click_sort_column']); + $column = ContentEntityDatabaseStorage::_fieldColumnName($field, $this->options['click_sort_column']); if (!isset($this->aliases[$column])) { // Column is not in query; add a sort on it (without adding the column). $this->aliases[$column] = $this->tableAlias . '.' . $column; diff --git a/core/modules/field/lib/Drupal/field/Tests/BulkDeleteTest.php b/core/modules/field/lib/Drupal/field/Tests/BulkDeleteTest.php index 90cc6fa..2b74370 100644 --- a/core/modules/field/lib/Drupal/field/Tests/BulkDeleteTest.php +++ b/core/modules/field/lib/Drupal/field/Tests/BulkDeleteTest.php @@ -7,7 +7,7 @@ namespace Drupal\field\Tests; -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; use Drupal\Core\Entity\EntityInterface; use Drupal\field\FieldConfigInterface; @@ -186,9 +186,9 @@ function testDeleteFieldInstance() { $this->assertEqual($instance->bundle, $bundle, 'The deleted instance is for the correct bundle'); // Check that the actual stored content did not change during delete. - $schema = FieldableDatabaseEntityStorage::_fieldSqlSchema($field); - $table = FieldableDatabaseEntityStorage::_fieldTableName($field); - $column = FieldableDatabaseEntityStorage::_fieldColumnName($field, 'value'); + $schema = ContentEntityDatabaseStorage::_fieldSqlSchema($field); + $table = ContentEntityDatabaseStorage::_fieldTableName($field); + $column = ContentEntityDatabaseStorage::_fieldColumnName($field, 'value'); $result = db_select($table, 't') ->fields('t', array_keys($schema[$table]['fields'])) ->execute(); diff --git a/core/modules/field/lib/Drupal/field/Tests/Views/ApiDataTest.php b/core/modules/field/lib/Drupal/field/Tests/Views/ApiDataTest.php index f8c48f5..be0d496 100644 --- a/core/modules/field/lib/Drupal/field/Tests/Views/ApiDataTest.php +++ b/core/modules/field/lib/Drupal/field/Tests/Views/ApiDataTest.php @@ -6,7 +6,7 @@ */ namespace Drupal\field\Tests\Views; -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; /** * Test the produced views_data. @@ -62,8 +62,8 @@ function testViewsData() { // Check the table and the joins of the first field. // Attached to node only. $field = $this->fields[0]; - $current_table = FieldableDatabaseEntityStorage::_fieldTableName($field); - $revision_table = FieldableDatabaseEntityStorage::_fieldRevisionTableName($field); + $current_table = ContentEntityDatabaseStorage::_fieldTableName($field); + $revision_table = ContentEntityDatabaseStorage::_fieldRevisionTableName($field); $data[$current_table] = $views_data->get($current_table); $data[$revision_table] = $views_data->get($revision_table); diff --git a/core/modules/field_ui/tests/modules/field_ui_test/lib/Drupal/field_ui_test/Entity/FieldUITestNoBundle.php b/core/modules/field_ui/tests/modules/field_ui_test/lib/Drupal/field_ui_test/Entity/FieldUITestNoBundle.php index d945b7f..bc4c3bc 100644 --- a/core/modules/field_ui/tests/modules/field_ui_test/lib/Drupal/field_ui_test/Entity/FieldUITestNoBundle.php +++ b/core/modules/field_ui/tests/modules/field_ui_test/lib/Drupal/field_ui_test/Entity/FieldUITestNoBundle.php @@ -16,7 +16,7 @@ * id = "field_ui_test_no_bundle", * label = @Translation("Test Field UI entity, no bundle"), * controllers = { - * "storage" = "Drupal\Core\Entity\DatabaseEntityStorage" + * "storage" = "Drupal\Core\Entity\EntityDatabaseStorage" * }, * fieldable = TRUE * ) diff --git a/core/modules/file/file.views.inc b/core/modules/file/file.views.inc index a5cafd8..6c3ff40 100644 --- a/core/modules/file/file.views.inc +++ b/core/modules/file/file.views.inc @@ -5,7 +5,7 @@ * Provide views data for file.module. */ -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; use Drupal\field\FieldConfigInterface; /** @@ -515,7 +515,7 @@ function file_field_views_data_views_data_alter(array &$data, FieldConfigInterfa 'id' => 'entity_reverse', 'field_name' => $field_name, 'entity_type' => $entity_type_id, - 'field table' => FieldableDatabaseEntityStorage::_fieldTableName($field), + 'field table' => ContentEntityDatabaseStorage::_fieldTableName($field), 'field field' => $field_name . '_target_id', 'base' => $entity_type->getBaseTable(), 'base field' => $entity_type->getKey('id'), diff --git a/core/modules/file/lib/Drupal/file/FileStorage.php b/core/modules/file/lib/Drupal/file/FileStorage.php index 80173eb..c6f2ccc 100644 --- a/core/modules/file/lib/Drupal/file/FileStorage.php +++ b/core/modules/file/lib/Drupal/file/FileStorage.php @@ -7,12 +7,12 @@ namespace Drupal\file; -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; /** * File storage for files. */ -class FileStorage extends FieldableDatabaseEntityStorage implements FileStorageInterface { +class FileStorage extends ContentEntityDatabaseStorage implements FileStorageInterface { /** * {@inheritdoc} diff --git a/core/modules/image/image.views.inc b/core/modules/image/image.views.inc index 87b9d19..fe2d59a 100644 --- a/core/modules/image/image.views.inc +++ b/core/modules/image/image.views.inc @@ -5,7 +5,7 @@ * Provide views data for image.module. */ -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; use Drupal\field\FieldConfigInterface; /** @@ -50,7 +50,7 @@ function image_field_views_data_views_data_alter(array &$data, FieldConfigInterf 'id' => 'entity_reverse', 'field_name' => $field_name, 'entity_type' => $entity_type_id, - 'field table' => FieldableDatabaseEntityStorage::_fieldTableName($field), + 'field table' => ContentEntityDatabaseStorage::_fieldTableName($field), 'field field' => $field_name . '_target_id', 'base' => $entity_type->getBaseTable(), 'base field' => $entity_type->getKey('id'), diff --git a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorage.php b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorage.php index 0084ce2..64f7ed6 100644 --- a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorage.php +++ b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorage.php @@ -7,17 +7,17 @@ namespace Drupal\menu_link; -use Drupal\Core\Entity\DatabaseEntityStorage; +use Drupal\Core\Entity\EntityDatabaseStorage; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityStorageException; /** * Controller class for menu links. * - * This extends the Drupal\entity\DatabaseEntityStorage class, adding + * This extends the Drupal\entity\EntityDatabaseStorage class, adding * required special handling for menu_link entities. */ -class MenuLinkStorage extends DatabaseEntityStorage implements MenuLinkStorageInterface { +class MenuLinkStorage extends EntityDatabaseStorage implements MenuLinkStorageInterface { /** * Indicates whether the delete operation should re-parent children items. @@ -64,7 +64,7 @@ public function save(EntityInterface $entity) { $entity->enforceIsNew(); } - // Unlike the save() method from DatabaseEntityStorage, we invoke the + // Unlike the save() method from EntityDatabaseStorage, we invoke the // 'presave' hook first because we want to allow modules to alter the // entity before all the logic from our preSave() method. $this->invokeHook('presave', $entity); diff --git a/core/modules/node/node.api.php b/core/modules/node/node.api.php index d9fdad8..1616fad 100644 --- a/core/modules/node/node.api.php +++ b/core/modules/node/node.api.php @@ -490,8 +490,8 @@ function hook_node_create(\Drupal\node\NodeInterface $node) { * * This hook is invoked during node loading, which is handled by entity_load(), * via classes Drupal\node\NodeStorage and - * Drupal\Core\Entity\DatabaseEntityStorage. After the node information and - * field values are read from the database or the entity cache, + * Drupal\Core\Entity\ContentEntityDatabaseStorage. After the node information + * and field values are read from the database or the entity cache, * hook_entity_load() is invoked on all implementing modules, and finally * hook_node_load() is invoked on all implementing modules. * diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityApiInfoTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityApiInfoTest.php index 5d065a0..712b628 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityApiInfoTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityApiInfoTest.php @@ -54,6 +54,6 @@ function testEntityInfoCacheWatchdog() { \Drupal::moduleHandler()->install(array('entity_cache_test')); $entity_type = \Drupal::state()->get('entity_cache_test'); $this->assertEqual($entity_type->getLabel(), 'Entity Cache Test', 'Entity info label is correct.'); - $this->assertEqual($entity_type->getStorageClass(), 'Drupal\Core\Entity\DatabaseEntityStorage', 'Entity controller class info is correct.'); + $this->assertEqual($entity_type->getStorageClass(), 'Drupal\Core\Entity\EntityDatabaseStorage', 'Entity controller class info is correct.'); } } diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/FieldSqlStorageTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/FieldSqlStorageTest.php index f9b2c9b..82e63b2 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Entity/FieldSqlStorageTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/FieldSqlStorageTest.php @@ -8,7 +8,7 @@ namespace Drupal\system\Tests\Entity; use Drupal\Core\Database\Database; -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; use Drupal\field\FieldException; use Drupal\field\Entity\FieldConfig; use Drupal\system\Tests\Entity\EntityUnitTestBase; @@ -85,8 +85,8 @@ function setUp() { )); $this->instance->save(); - $this->table = FieldableDatabaseEntityStorage::_fieldTableName($this->field); - $this->revision_table = FieldableDatabaseEntityStorage::_fieldRevisionTableName($this->field); + $this->table = ContentEntityDatabaseStorage::_fieldTableName($this->field); + $this->revision_table = ContentEntityDatabaseStorage::_fieldRevisionTableName($this->field); } /** @@ -96,7 +96,7 @@ function testFieldLoad() { $entity_type = $bundle = 'entity_test_rev'; $storage = $this->container->get('entity.manager')->getStorage($entity_type); - $columns = array('bundle', 'deleted', 'entity_id', 'revision_id', 'delta', 'langcode', FieldableDatabaseEntityStorage::_fieldColumnName($this->field, 'value')); + $columns = array('bundle', 'deleted', 'entity_id', 'revision_id', 'delta', 'langcode', ContentEntityDatabaseStorage::_fieldColumnName($this->field, 'value')); // Create an entity with four revisions. $revision_ids = array(); @@ -353,7 +353,7 @@ function testFieldUpdateFailure() { } // Ensure that the field tables are still there. - foreach (FieldableDatabaseEntityStorage::_fieldSqlSchema($prior_field) as $table_name => $table_info) { + foreach (ContentEntityDatabaseStorage::_fieldSqlSchema($prior_field) as $table_name => $table_info) { $this->assertTrue(db_table_exists($table_name), t('Table %table exists.', array('%table' => $table_name))); } } @@ -377,7 +377,7 @@ function testFieldUpdateIndexesWithData() { 'bundle' => $entity_type, )); $instance->save(); - $tables = array(FieldableDatabaseEntityStorage::_fieldTableName($field), FieldableDatabaseEntityStorage::_fieldRevisionTableName($field)); + $tables = array(ContentEntityDatabaseStorage::_fieldTableName($field), ContentEntityDatabaseStorage::_fieldRevisionTableName($field)); // Verify the indexes we will create do not exist yet. foreach ($tables as $table) { @@ -450,11 +450,11 @@ function testFieldSqlStorageForeignKeys() { $this->assertEqual($schema['foreign keys'][$foreign_key_name]['columns'][$foreign_key_name], 'id', 'Foreign key column name modified after update'); // Verify the SQL schema. - $schemas = FieldableDatabaseEntityStorage::_fieldSqlSchema($field); - $schema = $schemas[FieldableDatabaseEntityStorage::_fieldTableName($field)]; + $schemas = ContentEntityDatabaseStorage::_fieldSqlSchema($field); + $schema = $schemas[ContentEntityDatabaseStorage::_fieldTableName($field)]; $this->assertEqual(count($schema['foreign keys']), 1, 'There is 1 foreign key in the schema'); $foreign_key = reset($schema['foreign keys']); - $foreign_key_column = FieldableDatabaseEntityStorage::_fieldColumnName($field, $foreign_key_name); + $foreign_key_column = ContentEntityDatabaseStorage::_fieldColumnName($field, $foreign_key_name); $this->assertEqual($foreign_key['table'], $foreign_key_name, 'Foreign key table name preserved in the schema'); $this->assertEqual($foreign_key['columns'][$foreign_key_column], 'id', 'Foreign key column name preserved in the schema'); } @@ -504,9 +504,9 @@ public function testTableNames() { 'type' => 'test_field', )); $expected = 'short_entity_type__short_field_name'; - $this->assertEqual(FieldableDatabaseEntityStorage::_fieldTableName($field), $expected); + $this->assertEqual(ContentEntityDatabaseStorage::_fieldTableName($field), $expected); $expected = 'short_entity_type_revision__short_field_name'; - $this->assertEqual(FieldableDatabaseEntityStorage::_fieldRevisionTableName($field), $expected); + $this->assertEqual(ContentEntityDatabaseStorage::_fieldRevisionTableName($field), $expected); // Short entity type, long field name $entity_type = 'short_entity_type'; @@ -517,9 +517,9 @@ public function testTableNames() { 'type' => 'test_field', )); $expected = 'short_entity_type__' . substr(hash('sha256', $field->uuid), 0, 10); - $this->assertEqual(FieldableDatabaseEntityStorage::_fieldTableName($field), $expected); + $this->assertEqual(ContentEntityDatabaseStorage::_fieldTableName($field), $expected); $expected = 'short_entity_type_r__' . substr(hash('sha256', $field->uuid), 0, 10); - $this->assertEqual(FieldableDatabaseEntityStorage::_fieldRevisionTableName($field), $expected); + $this->assertEqual(ContentEntityDatabaseStorage::_fieldRevisionTableName($field), $expected); // Long entity type, short field name $entity_type = 'long_entity_type_abcdefghijklmnopqrstuvwxyz'; @@ -530,9 +530,9 @@ public function testTableNames() { 'type' => 'test_field', )); $expected = 'long_entity_type_abcdefghijklmnopq__' . substr(hash('sha256', $field->uuid), 0, 10); - $this->assertEqual(FieldableDatabaseEntityStorage::_fieldTableName($field), $expected); + $this->assertEqual(ContentEntityDatabaseStorage::_fieldTableName($field), $expected); $expected = 'long_entity_type_abcdefghijklmnopq_r__' . substr(hash('sha256', $field->uuid), 0, 10); - $this->assertEqual(FieldableDatabaseEntityStorage::_fieldRevisionTableName($field), $expected); + $this->assertEqual(ContentEntityDatabaseStorage::_fieldRevisionTableName($field), $expected); // Long entity type and field name. $entity_type = 'long_entity_type_abcdefghijklmnopqrstuvwxyz'; @@ -543,17 +543,17 @@ public function testTableNames() { 'type' => 'test_field', )); $expected = 'long_entity_type_abcdefghijklmnopq__' . substr(hash('sha256', $field->uuid), 0, 10); - $this->assertEqual(FieldableDatabaseEntityStorage::_fieldTableName($field), $expected); + $this->assertEqual(ContentEntityDatabaseStorage::_fieldTableName($field), $expected); $expected = 'long_entity_type_abcdefghijklmnopq_r__' . substr(hash('sha256', $field->uuid), 0, 10); - $this->assertEqual(FieldableDatabaseEntityStorage::_fieldRevisionTableName($field), $expected); + $this->assertEqual(ContentEntityDatabaseStorage::_fieldRevisionTableName($field), $expected); // Try creating a second field and check there are no clashes. $field2 = entity_create('field_config', array( 'entity_type' => $entity_type, 'name' => $field_name . '2', 'type' => 'test_field', )); - $this->assertNotEqual(FieldableDatabaseEntityStorage::_fieldTableName($field), FieldableDatabaseEntityStorage::_fieldTableName($field2)); - $this->assertNotEqual(FieldableDatabaseEntityStorage::_fieldRevisionTableName($field), FieldableDatabaseEntityStorage::_fieldRevisionTableName($field2)); + $this->assertNotEqual(ContentEntityDatabaseStorage::_fieldTableName($field), ContentEntityDatabaseStorage::_fieldTableName($field2)); + $this->assertNotEqual(ContentEntityDatabaseStorage::_fieldRevisionTableName($field), ContentEntityDatabaseStorage::_fieldRevisionTableName($field2)); // Deleted field. $field = entity_create('field_config', array( @@ -563,9 +563,9 @@ public function testTableNames() { 'deleted' => TRUE, )); $expected = 'field_deleted_data_' . substr(hash('sha256', $field->uuid), 0, 10); - $this->assertEqual(FieldableDatabaseEntityStorage::_fieldTableName($field), $expected); + $this->assertEqual(ContentEntityDatabaseStorage::_fieldTableName($field), $expected); $expected = 'field_deleted_revision_' . substr(hash('sha256', $field->uuid), 0, 10); - $this->assertEqual(FieldableDatabaseEntityStorage::_fieldRevisionTableName($field), $expected); + $this->assertEqual(ContentEntityDatabaseStorage::_fieldRevisionTableName($field), $expected); } } diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/FieldTranslationSqlStorageTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/FieldTranslationSqlStorageTest.php index f014d25..2e68569 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Entity/FieldTranslationSqlStorageTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/FieldTranslationSqlStorageTest.php @@ -8,7 +8,7 @@ namespace Drupal\system\Tests\Entity; use Drupal\Core\Entity\ContentEntityInterface; -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; use Drupal\Core\Language\Language; use Drupal\field\Field as FieldService; @@ -93,8 +93,8 @@ protected function assertFieldStorageLangcode(ContentEntityInterface $entity, $m foreach ($fields as $field_name) { $field = FieldService::fieldInfo()->getField($entity_type, $field_name); $tables = array( - FieldableDatabaseEntityStorage::_fieldTableName($field), - FieldableDatabaseEntityStorage::_fieldRevisionTableName($field), + ContentEntityDatabaseStorage::_fieldTableName($field), + ContentEntityDatabaseStorage::_fieldRevisionTableName($field), ); foreach ($tables as $table) { diff --git a/core/modules/system/tests/modules/entity_cache_test_dependency/lib/Drupal/entity_cache_test_dependency/Entity/EntityCacheTest.php b/core/modules/system/tests/modules/entity_cache_test_dependency/lib/Drupal/entity_cache_test_dependency/Entity/EntityCacheTest.php index ea7d298..dec7c7c 100644 --- a/core/modules/system/tests/modules/entity_cache_test_dependency/lib/Drupal/entity_cache_test_dependency/Entity/EntityCacheTest.php +++ b/core/modules/system/tests/modules/entity_cache_test_dependency/lib/Drupal/entity_cache_test_dependency/Entity/EntityCacheTest.php @@ -16,7 +16,7 @@ * id = "entity_cache_test", * label = @Translation("Entity cache test"), * controllers = { - * "storage" = "Drupal\Core\Entity\DatabaseEntityStorage", + * "storage" = "Drupal\Core\Entity\EntityDatabaseStorage", * } * ) */ diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorage.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorage.php index 6c774d9..b7b9201 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorage.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermStorage.php @@ -9,15 +9,15 @@ use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\Query\QueryInterface; -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; /** * Defines a Controller class for taxonomy terms. */ -class TermStorage extends FieldableDatabaseEntityStorage implements TermStorageInterface { +class TermStorage extends ContentEntityDatabaseStorage implements TermStorageInterface { /** - * Overrides Drupal\Core\Entity\DatabaseEntityStorage::create(). + * {@inheritdoc} * * @param array $values * An array of values to set, keyed by property name. A value for the @@ -33,7 +33,7 @@ public function create(array $values = array()) { } /** - * Overrides Drupal\Core\Entity\DatabaseEntityStorage::buildPropertyQuery(). + * {@inheritdoc} */ protected function buildPropertyQuery(QueryInterface $entity_query, array $values) { if (isset($values['name'])) { @@ -44,7 +44,7 @@ protected function buildPropertyQuery(QueryInterface $entity_query, array $value } /** - * Overrides Drupal\Core\Entity\DatabaseEntityStorage::resetCache(). + * {@inheritdoc} */ public function resetCache(array $ids = NULL) { drupal_static_reset('taxonomy_term_count_nodes'); diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index 37ee006..d5a307e 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -6,7 +6,7 @@ */ use Drupal\Component\Utility\Tags; -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; use Drupal\Core\Entity\EntityInterface; use Drupal\file\FileInterface; use Drupal\node\Entity\Node; @@ -824,7 +824,7 @@ function taxonomy_node_insert(EntityInterface $node) { function taxonomy_build_node_index($node) { // We maintain a denormalized table of term/node relationships, containing // only data for current, published nodes. - if (!\Drupal::config('taxonomy.settings')->get('maintain_index_table') || !(\Drupal::entityManager()->getStorage('node') instanceof FieldableDatabaseEntityStorage)) { + if (!\Drupal::config('taxonomy.settings')->get('maintain_index_table') || !(\Drupal::entityManager()->getStorage('node') instanceof ContentEntityDatabaseStorage)) { return; } diff --git a/core/modules/taxonomy/taxonomy.views.inc b/core/modules/taxonomy/taxonomy.views.inc index 4d3fead..59b94ff 100644 --- a/core/modules/taxonomy/taxonomy.views.inc +++ b/core/modules/taxonomy/taxonomy.views.inc @@ -5,7 +5,7 @@ * Provide views data for taxonomy.module. */ -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; use Drupal\field\FieldConfigInterface; /** @@ -448,7 +448,7 @@ function taxonomy_field_views_data_views_data_alter(array &$data, FieldConfigInt 'id' => 'entity_reverse', 'field_name' => $field_name, 'entity_type' => $entity_type_id, - 'field table' => FieldableDatabaseEntityStorage::_fieldTableName($field), + 'field table' => ContentEntityDatabaseStorage::_fieldTableName($field), 'field field' => $field_name . '_target_id', 'base' => $entity_type->getBaseTable(), 'base field' => $entity_type->getKey('id'), diff --git a/core/modules/user/lib/Drupal/user/UserStorage.php b/core/modules/user/lib/Drupal/user/UserStorage.php index 41e3156..d3f4990 100644 --- a/core/modules/user/lib/Drupal/user/UserStorage.php +++ b/core/modules/user/lib/Drupal/user/UserStorage.php @@ -15,15 +15,15 @@ use Drupal\field\FieldInfo; use Drupal\user\UserDataInterface; use Symfony\Component\DependencyInjection\ContainerInterface; -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; /** * Controller class for users. * - * This extends the Drupal\Core\Entity\DatabaseEntityStorage class, adding - * required special handling for user objects. + * This extends the Drupal\Core\Entity\ContentEntityDatabaseStorage class, + * adding required special handling for user objects. */ -class UserStorage extends FieldableDatabaseEntityStorage implements UserStorageInterface { +class UserStorage extends ContentEntityDatabaseStorage implements UserStorageInterface { /** * Provides the password hashing service object. diff --git a/core/modules/views/lib/Drupal/views/Tests/QueryGroupByTest.php b/core/modules/views/lib/Drupal/views/Tests/QueryGroupByTest.php index 5ef6c5e..7b7d0b7 100644 --- a/core/modules/views/lib/Drupal/views/Tests/QueryGroupByTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/QueryGroupByTest.php @@ -31,7 +31,7 @@ class QueryGroupByTest extends ViewUnitTestBase { /** * The storage for the test entity type. * - * @var \Drupal\Core\Entity\FieldableDatabaseEntityStorage + * @var \Drupal\Core\Entity\ContentEntityDatabaseStorage */ public $storage; diff --git a/core/tests/Drupal/Tests/Core/Entity/FieldableDatabaseEntityStorageTest.php b/core/tests/Drupal/Tests/Core/Entity/FieldableDatabaseEntityStorageTest.php index 07eba27..5170bd5 100644 --- a/core/tests/Drupal/Tests/Core/Entity/FieldableDatabaseEntityStorageTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/FieldableDatabaseEntityStorageTest.php @@ -2,13 +2,13 @@ /** * @file - * Contains \Drupal\Tests\Core\Entity\FieldableDatabaseEntityStorageTest. + * Contains \Drupal\Tests\Core\Entity\ContentEntityDatabaseStorageTest. */ namespace Drupal\Tests\Core\Entity; use Drupal\Core\Entity\EntityType; -use Drupal\Core\Entity\FieldableDatabaseEntityStorage; +use Drupal\Core\Entity\ContentEntityDatabaseStorage; use Drupal\Core\Field\FieldDefinition; use Drupal\Tests\UnitTestCase; use Symfony\Component\DependencyInjection\ContainerBuilder; @@ -16,12 +16,12 @@ /** * Tests the fieldable database storage. * - * @see \Drupal\Core\Entity\FieldableDatabaseEntityStorage + * @see \Drupal\Core\Entity\ContentEntityDatabaseStorage * * @group Drupal * @group Entity */ -class FieldableDatabaseEntityStorageTest extends UnitTestCase { +class ContentEntityDatabaseStorageTest extends UnitTestCase { /** * {@inheritdoc} @@ -37,7 +37,7 @@ public static function getInfo() { /** * Tests field SQL schema generation for an entity with a string identifier. * - * @see \Drupal\Core\Entity\Controller\FieldableDatabaseEntityStorage::_fieldSqlSchema() + * @see \Drupal\Core\Entity\Controller\ContentEntityDatabaseStorage::_fieldSqlSchema() */ public function testFieldSqlSchemaForEntityWithStringIdentifier() { $field_type_manager = $this->getMock('Drupal\Core\Field\FieldTypePluginManagerInterface'); @@ -106,7 +106,7 @@ public function testFieldSqlSchemaForEntityWithStringIdentifier() { ->method('getSchema') ->will($this->returnValue($field_schema)); - $schema = FieldableDatabaseEntityStorage::_fieldSqlSchema($field); + $schema = ContentEntityDatabaseStorage::_fieldSqlSchema($field); // Make sure that the entity_id schema field if of type varchar. $this->assertEquals($schema['test_entity__test_field']['fields']['entity_id']['type'], 'varchar');