diff --git a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php index 3783af7..2d45275 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php @@ -26,7 +26,7 @@ * This class can be used as-is by most content entity types. Entity types * requiring special handling can extend the class. * - * The class uses \Drupal\Core\Entity\Schema\ContentEntitySchemaHandler + * The class uses \Drupal\Core\Entity\Schema\SqlContentEntityStorageSchema * internally in order to automatically generate the database schema based on * the defined base fields. Entity types can override * ContentEntityDatabaseStorage::getSchema() to customize the generated @@ -227,12 +227,12 @@ public function getSchema() { /** * Gets the schema handler for this entity storage. * - * @return \Drupal\Core\Entity\Schema\ContentEntitySchemaHandler + * @return \Drupal\Core\Entity\Schema\SqlContentEntityStorageSchema * The schema handler. */ protected function schemaHandler() { if (!isset($this->schemaHandler)) { - $schema_handler_class = $this->entityType->getHandlerClass('storage_schema') ?: 'Drupal\Core\Entity\Schema\ContentEntitySchemaHandler'; + $schema_handler_class = $this->entityType->getHandlerClass('storage_schema') ?: 'Drupal\Core\Entity\Schema\SqlContentEntityStorageSchema'; $this->schemaHandler = new $schema_handler_class($this->entityManager, $this->entityType, $this); } return $this->schemaHandler; @@ -1023,8 +1023,8 @@ protected function mapToStorageRecord(ContentEntityInterface $entity, $table_nam * @return bool * TRUE if the the column is serial, FALSE otherwise. * - * @see \Drupal\Core\Entity\Schema\ContentEntitySchemaHandler::processBaseTable() - * @see \Drupal\Core\Entity\Schema\ContentEntitySchemaHandler::processRevisionTable() + * @see \Drupal\Core\Entity\Schema\SqlContentEntityStorageSchema::processBaseTable() + * @see \Drupal\Core\Entity\Schema\SqlContentEntityStorageSchema::processRevisionTable() */ protected function isColumnSerial($table_name, $schema_name) { $result = FALSE; diff --git a/core/modules/aggregator/src/FeedStorageSchema.php b/core/modules/aggregator/src/FeedStorageSchema.php index 8fdcde5..41cfcb1 100644 --- a/core/modules/aggregator/src/FeedStorageSchema.php +++ b/core/modules/aggregator/src/FeedStorageSchema.php @@ -8,12 +8,12 @@ namespace Drupal\aggregator; use Drupal\Core\Entity\ContentEntityTypeInterface; -use Drupal\Core\Entity\Schema\ContentEntitySchemaHandler; +use Drupal\Core\Entity\Schema\SqlContentEntityStorageSchema; /** * Defines the feed schema handler. */ -class FeedStorageSchema extends ContentEntitySchemaHandler { +class FeedStorageSchema extends SqlContentEntityStorageSchema { /** * {@inheritdoc} diff --git a/core/modules/aggregator/src/ItemStorageSchema.php b/core/modules/aggregator/src/ItemStorageSchema.php index 7f76ae7..3b52c95 100644 --- a/core/modules/aggregator/src/ItemStorageSchema.php +++ b/core/modules/aggregator/src/ItemStorageSchema.php @@ -8,12 +8,12 @@ namespace Drupal\aggregator; use Drupal\Core\Entity\ContentEntityTypeInterface; -use Drupal\Core\Entity\Schema\ContentEntitySchemaHandler; +use Drupal\Core\Entity\Schema\SqlContentEntityStorageSchema; /** * Defines the item schema handler. */ -class ItemStorageSchema extends ContentEntitySchemaHandler { +class ItemStorageSchema extends SqlContentEntityStorageSchema { /** * {@inheritdoc} diff --git a/core/modules/block_content/src/BlockContentStorageSchema.php b/core/modules/block_content/src/BlockContentStorageSchema.php index 5558401..533e5c8 100644 --- a/core/modules/block_content/src/BlockContentStorageSchema.php +++ b/core/modules/block_content/src/BlockContentStorageSchema.php @@ -8,12 +8,12 @@ namespace Drupal\block_content; use Drupal\Core\Entity\ContentEntityTypeInterface; -use Drupal\Core\Entity\Schema\ContentEntitySchemaHandler; +use Drupal\Core\Entity\Schema\SqlContentEntityStorageSchema; /** * Defines the block content schema handler. */ -class BlockContentStorageSchema extends ContentEntitySchemaHandler { +class BlockContentStorageSchema extends SqlContentEntityStorageSchema { /** * {@inheritdoc} diff --git a/core/modules/comment/src/CommentStorageSchema.php b/core/modules/comment/src/CommentStorageSchema.php index a9f14dc..722f576 100644 --- a/core/modules/comment/src/CommentStorageSchema.php +++ b/core/modules/comment/src/CommentStorageSchema.php @@ -8,12 +8,12 @@ namespace Drupal\comment; use Drupal\Core\Entity\ContentEntityTypeInterface; -use Drupal\Core\Entity\Schema\ContentEntitySchemaHandler; +use Drupal\Core\Entity\Schema\SqlContentEntityStorageSchema; /** * Defines the comment schema handler. */ -class CommentStorageSchema extends ContentEntitySchemaHandler { +class CommentStorageSchema extends SqlContentEntityStorageSchema { /** * {@inheritdoc} diff --git a/core/modules/file/src/FileStorageSchema.php b/core/modules/file/src/FileStorageSchema.php index 4a101fe..3e38341 100644 --- a/core/modules/file/src/FileStorageSchema.php +++ b/core/modules/file/src/FileStorageSchema.php @@ -8,12 +8,12 @@ namespace Drupal\file; use Drupal\Core\Entity\ContentEntityTypeInterface; -use Drupal\Core\Entity\Schema\ContentEntitySchemaHandler; +use Drupal\Core\Entity\Schema\SqlContentEntityStorageSchema; /** * Defines the file schema handler. */ -class FileStorageSchema extends ContentEntitySchemaHandler { +class FileStorageSchema extends SqlContentEntityStorageSchema { /** * {@inheritdoc} diff --git a/core/modules/node/src/NodeStorageSchema.php b/core/modules/node/src/NodeStorageSchema.php index 7df2996..b7aa91f 100644 --- a/core/modules/node/src/NodeStorageSchema.php +++ b/core/modules/node/src/NodeStorageSchema.php @@ -8,12 +8,12 @@ namespace Drupal\node; use Drupal\Core\Entity\ContentEntityTypeInterface; -use Drupal\Core\Entity\Schema\ContentEntitySchemaHandler; +use Drupal\Core\Entity\Schema\SqlContentEntityStorageSchema; /** * Defines the node schema handler. */ -class NodeStorageSchema extends ContentEntitySchemaHandler { +class NodeStorageSchema extends SqlContentEntityStorageSchema { /** * {@inheritdoc} diff --git a/core/modules/taxonomy/src/TermStorageSchema.php b/core/modules/taxonomy/src/TermStorageSchema.php index ba2a452..349c87f 100644 --- a/core/modules/taxonomy/src/TermStorageSchema.php +++ b/core/modules/taxonomy/src/TermStorageSchema.php @@ -8,12 +8,12 @@ namespace Drupal\taxonomy; use Drupal\Core\Entity\ContentEntityTypeInterface; -use Drupal\Core\Entity\Schema\ContentEntitySchemaHandler; +use Drupal\Core\Entity\Schema\SqlContentEntityStorageSchema; /** * Defines the term schema handler. */ -class TermStorageSchema extends ContentEntitySchemaHandler { +class TermStorageSchema extends SqlContentEntityStorageSchema { /** * {@inheritdoc} diff --git a/core/modules/user/src/UserStorageSchema.php b/core/modules/user/src/UserStorageSchema.php index 67a7166..494e9f0 100644 --- a/core/modules/user/src/UserStorageSchema.php +++ b/core/modules/user/src/UserStorageSchema.php @@ -8,12 +8,12 @@ namespace Drupal\user; use Drupal\Core\Entity\ContentEntityTypeInterface; -use Drupal\Core\Entity\Schema\ContentEntitySchemaHandler; +use Drupal\Core\Entity\Schema\SqlContentEntityStorageSchema; /** * Defines the user schema handler. */ -class UserStorageSchema extends ContentEntitySchemaHandler { +class UserStorageSchema extends SqlContentEntityStorageSchema { /** * {@inheritdoc} diff --git a/core/tests/Drupal/Tests/Core/Entity/ContentEntityDatabaseStorageTest.php b/core/tests/Drupal/Tests/Core/Entity/ContentEntityDatabaseStorageTest.php index fde0d84..51ac5df 100644 --- a/core/tests/Drupal/Tests/Core/Entity/ContentEntityDatabaseStorageTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/ContentEntityDatabaseStorageTest.php @@ -299,9 +299,9 @@ public function testGetSchema() { // ContentEntityStorageBase::__construct() array('uuid', NULL), array('bundle', NULL), - // ContentEntitySchemaHandler::initializeBaseTable() + // SqlContentEntityStorageSchema::initializeBaseTable() array('id' => 'id'), - // ContentEntitySchemaHandler::processBaseTable() + // SqlContentEntityStorageSchema::processBaseTable() array('id' => 'id'), ))); @@ -331,7 +331,7 @@ public function testGetSchema() { $this->assertEquals($expected, $this->entityStorage->getSchema()); // Test that repeated calls do not result in repeatedly instantiating - // ContentEntitySchemaHandler as getFieldStorageDefinitions() is only + // SqlContentEntityStorageSchema as getFieldStorageDefinitions() is only // expected to be called once. $this->assertEquals($expected, $this->entityStorage->getSchema()); } diff --git a/core/tests/Drupal/Tests/Core/Entity/Schema/SqlContentEntityStorageSchemaTest.php b/core/tests/Drupal/Tests/Core/Entity/Schema/SqlContentEntityStorageSchemaTest.php index 9771110..f1e6a5b 100644 --- a/core/tests/Drupal/Tests/Core/Entity/Schema/SqlContentEntityStorageSchemaTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/Schema/SqlContentEntityStorageSchemaTest.php @@ -8,12 +8,12 @@ namespace Drupal\Tests\Core\Entity\Schema; use Drupal\Core\Entity\ContentEntityType; -use Drupal\Core\Entity\Schema\ContentEntitySchemaHandler; +use Drupal\Core\Entity\Schema\SqlContentEntityStorageSchema; use Drupal\Core\Entity\Sql\DefaultTableMapping; use Drupal\Tests\UnitTestCase; /** - * @coversDefaultClass \Drupal\Core\Entity\Schema\ContentEntitySchemaHandler + * @coversDefaultClass \Drupal\Core\Entity\Schema\SqlContentEntityStorageSchema * @group Entity */ class SqlContentEntityStorageSchemaTest extends UnitTestCase { @@ -49,7 +49,7 @@ class SqlContentEntityStorageSchemaTest extends UnitTestCase { /** * The content entity schema handler used in this test. * - * @var \Drupal\Core\Entity\Schema\ContentEntitySchemaHandler. + * @var \Drupal\Core\Entity\Schema\SqlContentEntityStorageSchema. */ protected $schemaHandler; @@ -778,7 +778,7 @@ protected function setUpSchemaHandler() { ->method('getFieldStorageDefinitions') ->with($this->entityType->id()) ->will($this->returnValue($this->storageDefinitions)); - $this->schemaHandler = new ContentEntitySchemaHandler( + $this->schemaHandler = new SqlContentEntityStorageSchema( $this->entityManager, $this->entityType, $this->storage