protected SqlContentEntityStorage::initTableLayout()
Initializes table name variables.
File
- core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php, line 168
Class
- SqlContentEntityStorage
- A content entity database storage implementation.
Namespace
Drupal\Core\Entity\Sql
Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | protected function initTableLayout() { // Reset table field values to ensure changes in the entity type definition // are correctly reflected in the table layout. $this ->tableMapping = NULL; $this ->revisionKey = NULL; $this ->revisionTable = NULL; $this ->dataTable = NULL; $this ->revisionDataTable = NULL; // @todo Remove table names from the entity type definition in $this ->baseTable = $this ->entityType->getBaseTable() ? : $this ->entityTypeId; $revisionable = $this ->entityType->isRevisionable(); if ( $revisionable ) { $this ->revisionKey = $this ->entityType->getKey( 'revision' ) ? : 'revision_id' ; $this ->revisionTable = $this ->entityType->getRevisionTable() ? : $this ->entityTypeId . '_revision' ; } $translatable = $this ->entityType->isTranslatable(); if ( $translatable ) { $this ->dataTable = $this ->entityType->getDataTable() ? : $this ->entityTypeId . '_field_data' ; $this ->langcodeKey = $this ->entityType->getKey( 'langcode' ); $this ->defaultLangcodeKey = $this ->entityType->getKey( 'default_langcode' ); } if ( $revisionable && $translatable ) { $this ->revisionDataTable = $this ->entityType->getRevisionDataTable() ? : $this ->entityTypeId . '_field_revision' ; } } |
Please login to continue.