diff --git a/src/contracts/Persistence/Content/ContentInfo.php b/src/contracts/Persistence/Content/ContentInfo.php index 108a247625..cf7216916e 100644 --- a/src/contracts/Persistence/Content/ContentInfo.php +++ b/src/contracts/Persistence/Content/ContentInfo.php @@ -43,6 +43,8 @@ class ContentInfo extends ValueObject */ public $contentTypeId; + public string $contentTypeIdentifier; + /** * Section id the content is assigned to. * @@ -134,6 +136,11 @@ class ContentInfo extends ValueObject * @var bool */ public $isHidden = false; + + public function getContentIdentifier(): string + { + return $this->contentTypeIdentifier; + } } class_alias(ContentInfo::class, 'eZ\Publish\SPI\Persistence\Content\ContentInfo'); diff --git a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php index c91ac70df9..2c98790f83 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php @@ -769,7 +769,8 @@ private function internalLoadContent( 'a.data_text AS ezcontentobject_attribute_data_text', 'a.sort_key_int AS ezcontentobject_attribute_sort_key_int', 'a.sort_key_string AS ezcontentobject_attribute_sort_key_string', - 't.main_node_id AS ezcontentobject_tree_main_node_id' + 't.main_node_id AS ezcontentobject_tree_main_node_id', + 'cc.identifier AS ezcontentclass_identifier', ) ->from('ezcontentobject', 'c') ->innerJoin( @@ -798,6 +799,15 @@ private function internalLoadContent( $expr->eq('c.id', 't.contentobject_id'), $expr->eq('t.node_id', 't.main_node_id') ) + ) + ->leftJoin( + 'c', + 'ezcontentclass', + 'cc', + $expr->and( + $expr->eq('c.contentclass_id', 'cc.id'), + $expr->eq('cc.version', 0) + ) ); $queryBuilder->where( diff --git a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php index cdc28887e9..3035d5fa62 100644 --- a/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php +++ b/src/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabase/QueryBuilder.php @@ -113,13 +113,26 @@ public function createLoadContentInfoQueryBuilder( } $queryBuilder - ->select('c.*', 't.main_node_id AS ezcontentobject_tree_main_node_id') + ->select( + 'c.*', + 't.main_node_id AS ezcontentobject_tree_main_node_id', + 'cc.identifier AS ezcontentclass_identifier' + ) ->from(Gateway::CONTENT_ITEM_TABLE, 'c') ->leftJoin( 'c', 'ezcontentobject_tree', 't', $joinCondition + ) + ->leftJoin( + 'c', + 'ezcontentclass', + 'cc', + $expr->and( + $expr->eq('c.contentclass_id', 'cc.id'), + $expr->eq('cc.version', 0) + ) ); return $queryBuilder; @@ -163,7 +176,9 @@ public function createVersionInfoFindQueryBuilder(): DoctrineQueryBuilder 'c.status AS ezcontentobject_status', 'c.name AS ezcontentobject_name', 'c.language_mask AS ezcontentobject_language_mask', - 'c.is_hidden AS ezcontentobject_is_hidden' + 'c.is_hidden AS ezcontentobject_is_hidden', + // Content class + 'cc.identifier AS ezcontentclass_identifier' ) ->from(Gateway::CONTENT_VERSION_TABLE, 'v') ->innerJoin( @@ -180,6 +195,15 @@ public function createVersionInfoFindQueryBuilder(): DoctrineQueryBuilder $expr->eq('t.contentobject_id', 'v.contentobject_id'), $expr->eq('t.main_node_id', 't.node_id') ) + ) + ->leftJoin( + 'c', + 'ezcontentclass', + 'cc', + $expr->and( + $expr->eq('c.contentclass_id', 'cc.id'), + $expr->eq('cc.version', 0) + ) ); return $query; diff --git a/src/lib/Persistence/Legacy/Content/Mapper.php b/src/lib/Persistence/Legacy/Content/Mapper.php index b7cf7823be..f043bc89b5 100644 --- a/src/lib/Persistence/Legacy/Content/Mapper.php +++ b/src/lib/Persistence/Legacy/Content/Mapper.php @@ -243,12 +243,17 @@ public function extractContentFromRows(array $rows, array $nameRows, $prefix = ' * * @return \Ibexa\Contracts\Core\Persistence\Content\ContentInfo */ - public function extractContentInfoFromRow(array $row, $prefix = '', $treePrefix = 'ezcontentobject_tree_') - { + public function extractContentInfoFromRow( + array $row, + $prefix = '', + $treePrefix = 'ezcontentobject_tree_', + $contentClassPrefix = 'ezcontentclass_' + ) { $contentInfo = new ContentInfo(); $contentInfo->id = (int)$row["{$prefix}id"]; $contentInfo->name = $row["{$prefix}name"]; $contentInfo->contentTypeId = (int)$row["{$prefix}contentclass_id"]; + $contentInfo->contentTypeIdentifier = $row["{$contentClassPrefix}identifier"]; $contentInfo->sectionId = (int)$row["{$prefix}section_id"]; $contentInfo->currentVersionNo = (int)$row["{$prefix}current_version"]; $contentInfo->isPublished = ($row["{$prefix}status"] == ContentInfo::STATUS_PUBLISHED); diff --git a/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php b/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php index 1fb0688ca2..7f8f2fd525 100644 --- a/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php +++ b/src/lib/Search/Legacy/Content/Gateway/DoctrineDatabase.php @@ -216,8 +216,9 @@ private function getContentInfoList( array $languageFilter ): array { $query = $this->connection->createQueryBuilder(); + $expr = $query->expr(); $query->select( - 'DISTINCT c.*, main_tree.main_node_id AS main_tree_main_node_id', + 'DISTINCT c.*, main_tree.main_node_id AS main_tree_main_node_id, cc.identifier AS ezcontentclass_identifier', ); if ($sort !== null) { @@ -236,10 +237,19 @@ private function getContentInfoList( 'c', LocationGateway::CONTENT_TREE_TABLE, 'main_tree', - $query->expr()->andX( + $expr->andX( 'main_tree.contentobject_id = c.id', 'main_tree.main_node_id = main_tree.node_id' ) + ) + ->leftJoin( + 'c', + 'ezcontentclass', + 'cc', + $expr->and( + $expr->eq('c.contentclass_id', 'cc.id'), + $expr->eq('cc.version', 0) + ) ); if ($sort !== null) { diff --git a/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php b/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php index 8d8a004560..1975202b91 100644 --- a/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php +++ b/tests/lib/Persistence/Legacy/Content/Gateway/DoctrineDatabaseTest.php @@ -608,7 +608,7 @@ public function testListVersions(): void foreach ($res as $row) { $this->assertCount( - 23, + 24, $row ); } @@ -651,7 +651,7 @@ public function testListVersionsForUser() foreach ($res as $row) { $this->assertCount( - 23, + 24, $row ); } @@ -698,9 +698,7 @@ public function testLoadWithAllTranslations() public function testCreateFixtureForMapperExtractContentFromRowsMultipleVersions() { - $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' - ); + $this->insertContentToDatabase(); $gateway = $this->getDatabaseGateway(); @@ -721,9 +719,7 @@ public function testCreateFixtureForMapperExtractContentFromRowsMultipleVersions public function testCreateFixtureForMapperExtractContentFromRows() { - $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' - ); + $this->insertContentToDatabase(); $gateway = $this->getDatabaseGateway(); @@ -1667,9 +1663,7 @@ public function testUpdateContentRemoveAlwaysAvailableFlagMultilingual(): void */ public function testLoadVersionInfo(): void { - $this->insertDatabaseFixture( - __DIR__ . '/../_fixtures/contentobjects.php' - ); + $this->insertContentToDatabase(); $gateway = $this->getDatabaseGateway(); @@ -1989,6 +1983,17 @@ private function assertContentVersionAttributesLanguages( ->orderBy('id') ); } + + private function insertContentToDatabase(): void + { + $this->insertDatabaseFixture( + __DIR__ . '/../_fixtures/contentclass.php' + ); + + $this->insertDatabaseFixture( + __DIR__ . '/../_fixtures/contentobjects.php' + ); + } } class_alias(DoctrineDatabaseTest::class, 'eZ\Publish\Core\Persistence\Legacy\Tests\Content\Gateway\DoctrineDatabaseTest'); diff --git a/tests/lib/Persistence/Legacy/Content/_fixtures/contentclass.php b/tests/lib/Persistence/Legacy/Content/_fixtures/contentclass.php new file mode 100644 index 0000000000..7dc4005b62 --- /dev/null +++ b/tests/lib/Persistence/Legacy/Content/_fixtures/contentclass.php @@ -0,0 +1,410 @@ + [ + 0 => [ + 'id' => 1, + 'version' => '0', + 'always_available' => 0, + 'contentobject_name' => '', + 'created' => '1033917596', + 'creator_id' => 14, + 'identifier' => 'folder', + 'initial_language_id' => 2, + 'is_container' => true, + 'language_mask' => 2, + 'modified' => '1311154215', + 'modifier_id' => 14, + 'remote_id' => '5fcdb3fb687dd6dcf8c94bc84e8bd1b2', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:1:{s:6:"eng-GB";s:6:"Folder";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + 1 => [ + 'id' => 3, + 'version' => '0', + 'always_available' => 1, + 'contentobject_name' => '', + 'created' => '1033917896', + 'creator_id' => 14, + 'identifier' => 'user_group', + 'initial_language_id' => 2, + 'is_container' => true, + 'language_mask' => 2, + 'modified' => '1311154815', + 'modifier_id' => 14, + 'remote_id' => '0f2622aad22267e195c8e76b05c25e29', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:2:{s:6:"eng-GB";s:10:"User group";s:16:"always-available";s:6:"eng-GB";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + 2 => [ + 'id' => 4, + 'version' => '0', + 'always_available' => 0, + 'contentobject_name' => ' ', + 'created' => '1033918596', + 'creator_id' => 14, + 'identifier' => 'user', + 'initial_language_id' => 2, + 'is_container' => false, + 'language_mask' => 2, + 'modified' => '1311184215', + 'modifier_id' => 14, + 'remote_id' => '40cca73dac5cec06af9e2f3e1d79f296', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:2:{s:6:"eng-GB";s:4:"User";s:16:"always-available";s:6:"eng-GB";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + 3 => [ + 'id' => 14, + 'version' => '0', + 'always_available' => 0, + 'contentobject_name' => '', + 'created' => '1033917896', + 'creator_id' => 14, + 'identifier' => 'file', + 'initial_language_id' => 2, + 'is_container' => false, + 'language_mask' => 2, + 'modified' => '1311158215', + 'modifier_id' => 14, + 'remote_id' => '808394adba21c655214c18aeab95fc27', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:2:{s:6:"eng-GB";s:4:"File";s:16:"always-available";s:6:"eng-GB";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + 4 => [ + 'id' => 15, + 'version' => 1, + 'always_available' => 0, + 'contentobject_name' => null, + 'created' => '1033917996', + 'creator_id' => 14, + 'identifier' => 'landing_page', + 'initial_language_id' => 2, + 'is_container' => true, + 'language_mask' => 2, + 'modified' => '1311154915', + 'modifier_id' => 14, + 'remote_id' => '3f0f42fe0d5ad444ffbc4fefe92a3f06', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:1:{s:6:"eng-GB";s:12:"Landing page";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + 5 => [ + 'id' => 16, + 'version' => '0', + 'always_available' => 0, + 'contentobject_name' => '<name>', + 'created' => '1033915596', + 'creator_id' => 14, + 'identifier' => 'article', + 'initial_language_id' => 2, + 'is_container' => true, + 'language_mask' => 2, + 'modified' => '1311154255', + 'modifier_id' => 14, + 'remote_id' => 'af4e6d7bf4ed96fc77eb5839e8c2ceb8', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:1:{s:6:"eng-GB";s:7:"Article";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + 6 => [ + 'id' => 18, + 'version' => '0', + 'always_available' => 0, + 'contentobject_name' => '<name>', + 'created' => '1033917536', + 'creator_id' => 14, + 'identifier' => 'tag', + 'initial_language_id' => 2, + 'is_container' => true, + 'language_mask' => 2, + 'modified' => '13111542635', + 'modifier_id' => 14, + 'remote_id' => '9f4373927b4f2d9109aa5b97dc3fbeb6', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:1:{s:6:"eng-GB";s:3:"Tag";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + 7 => [ + 'id' => 20, + 'version' => '0', + 'always_available' => 0, + 'contentobject_name' => '<name>', + 'created' => '1033917556', + 'creator_id' => 14, + 'identifier' => 'product_category_tag', + 'initial_language_id' => 2, + 'is_container' => true, + 'language_mask' => 2, + 'modified' => '1311154255', + 'modifier_id' => 14, + 'remote_id' => 'f64c05d15c81d9ed239c997c7ef7f088', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:1:{s:6:"eng-GB";s:6:"Folder";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + 8 => [ + 'id' => 21, + 'version' => '0', + 'always_available' => 0, + 'contentobject_name' => '<name>', + 'created' => '1033917796', + 'creator_id' => 14, + 'identifier' => 'customer', + 'initial_language_id' => 2, + 'is_container' => false, + 'language_mask' => 2, + 'modified' => '1311154415', + 'modifier_id' => 14, + 'remote_id' => '14883b7cf325724dcb7cc279a0455a7b', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:1:{s:6:"eng-GB";s:8:"Customer";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + 9 => [ + 'id' => 22, + 'version' => '0', + 'always_available' => 1, + 'contentobject_name' => '<name>', + 'created' => '1033917696', + 'creator_id' => 14, + 'identifier' => 'member', + 'initial_language_id' => 2, + 'is_container' => false, + 'language_mask' => 2, + 'modified' => '1311154225', + 'modifier_id' => 14, + 'remote_id' => 'e8b9d33d5fd346e3d2787fdf0a75ab1a', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:1:{s:6:"eng-GB";s:6:"Member";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + 10 => [ + 'id' => 23, + 'version' => '0', + 'always_available' => 0, + 'contentobject_name' => '<name>', + 'created' => '1033917096', + 'creator_id' => 14, + 'identifier' => 'company', + 'initial_language_id' => 2, + 'is_container' => false, + 'language_mask' => 2, + 'modified' => '1311154015', + 'modifier_id' => 14, + 'remote_id' => 'd1bc6331c8df0a5efb4d24d8bd5862da', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:1:{s:6:"eng-GB";s:7:"Company";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + 11 => [ + 'id' => 24, + 'version' => '0', + 'always_available' => 0, + 'contentobject_name' => '<name>', + 'created' => '1033917506', + 'creator_id' => 14, + 'identifier' => 'shipping_address', + 'initial_language_id' => 2, + 'is_container' => true, + 'language_mask' => 2, + 'modified' => '1311154205', + 'modifier_id' => 14, + 'remote_id' => '4180aa6f06a49835fbb9e380a30d9fe5', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:1:{s:6:"eng-GB";s:16:"Shipping address";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + 12 => [ + 'id' => 25, + 'version' => '0', + 'always_available' => 0, + 'contentobject_name' => '<name>', + 'created' => '1033917590', + 'creator_id' => 14, + 'identifier' => 'customer_portal', + 'initial_language_id' => 2, + 'is_container' => true, + 'language_mask' => 2, + 'modified' => '1311154210', + 'modifier_id' => 14, + 'remote_id' => '7fb809789d8a799f24d1205c284555df', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:1:{s:6:"eng-GB";s:15:"Customer Portal";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + 13 => [ + 'id' => 26, + 'version' => '0', + 'always_available' => 1, + 'contentobject_name' => '<name>', + 'created' => '1033917600', + 'creator_id' => 14, + 'identifier' => 'new_product_type', + 'initial_language_id' => 2, + 'is_container' => true, + 'language_mask' => 2, + 'modified' => '1311154220', + 'modifier_id' => 14, + 'remote_id' => '826779f2aef696943a9e0c1d55bb881d', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:1:{s:6:"eng-GB";s:16:"New product type";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + 14 => [ + 'id' => 30, + 'version' => '0', + 'always_available' => 0, + 'contentobject_name' => '<tag_name>', + 'created' => '1033917599', + 'creator_id' => 14, + 'identifier' => 'new_tag', + 'initial_language_id' => 2, + 'is_container' => true, + 'language_mask' => 2, + 'modified' => '1311154219', + 'modifier_id' => 14, + 'remote_id' => '5ea8fae70c53f76ca83b23cce8a5400a', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:1:{s:6:"eng-GB";s:7:"New Tag";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + 15 => [ + 'id' => 35, + 'version' => '0', + 'always_available' => 0, + 'contentobject_name' => '<name>', + 'created' => '1033917598', + 'creator_id' => 14, + 'identifier' => 'old_tag', + 'initial_language_id' => 2, + 'is_container' => false, + 'language_mask' => 2, + 'modified' => '1311154218', + 'modifier_id' => 14, + 'remote_id' => '10820975ade1fe98bc93372c4263f0fb', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:1:{s:6:"eng-GB";s:7:"Old Tag";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + 16 => [ + 'id' => 37, + 'version' => '0', + 'always_available' => 0, + 'contentobject_name' => '<name>', + 'created' => '1033917597', + 'creator_id' => 14, + 'identifier' => 'page', + 'initial_language_id' => 2, + 'is_container' => true, + 'language_mask' => 2, + 'modified' => '1311154217', + 'modifier_id' => 14, + 'remote_id' => 'ac76f2a4caea8329c11126957941e2e0', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:1:{s:6:"eng-GB";s:4:"Page";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + 17 => [ + 'id' => 38, + 'version' => '0', + 'always_available' => 1, + 'contentobject_name' => '<name>', + 'created' => '1033917591', + 'creator_id' => 14, + 'identifier' => 'lottery', + 'initial_language_id' => 2, + 'is_container' => false, + 'language_mask' => 2, + 'modified' => '1311154211', + 'modifier_id' => 14, + 'remote_id' => '0e9228de7bd25b334c138e2fb143db77', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:1:{s:6:"eng-GB";s:7:"Lottery";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + 18 => [ + 'id' => 41, + 'version' => '0', + 'always_available' => 0, + 'contentobject_name' => '<name>', + 'created' => '1033917594', + 'creator_id' => 14, + 'identifier' => 'test', + 'initial_language_id' => 2, + 'is_container' => false, + 'language_mask' => 2, + 'modified' => '1311154213', + 'modifier_id' => 14, + 'remote_id' => '513ea82647fef3e8401a985d2743884b', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:1:{s:6:"eng-GB";s:4:"Test";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + 19 => [ + 'id' => 42, + 'version' => '0', + 'always_available' => 1, + 'contentobject_name' => '<name>', + 'created' => '1033917595', + 'creator_id' => 14, + 'identifier' => 'news', + 'initial_language_id' => 2, + 'is_container' => true, + 'language_mask' => 2, + 'modified' => '1311154214', + 'modifier_id' => 14, + 'remote_id' => 'faeb8e023bcba08bac3439732d49ab40', + 'serialized_description_list' => 'a:0:{}', + 'serialized_name_list' => 'a:1:{s:6:"eng-GB";s:4:"News";}', + 'sort_field' => 1, + 'sort_order' => 1, + 'url_alias_name' => null, + ], + ], +]; diff --git a/tests/lib/Persistence/Legacy/Content/_fixtures/extract_content_from_rows.php b/tests/lib/Persistence/Legacy/Content/_fixtures/extract_content_from_rows.php index 3fd8ba1912..27328b80e3 100644 --- a/tests/lib/Persistence/Legacy/Content/_fixtures/extract_content_from_rows.php +++ b/tests/lib/Persistence/Legacy/Content/_fixtures/extract_content_from_rows.php @@ -38,6 +38,7 @@ 'ezcontentobject_attribute_sort_key_int' => '0', 'ezcontentobject_attribute_sort_key_string' => '', 'ezcontentobject_tree_main_node_id' => '228', + 'ezcontentclass_identifier' => 'article', ], 1 => [ 'ezcontentobject_id' => '226', @@ -72,6 +73,7 @@ 'ezcontentobject_attribute_sort_key_string' => 'new test article (2)', 'ezcontentobject_tree_main_node_id' => '228', 'ezcontentobject_is_hidden' => '0', + 'ezcontentclass_identifier' => 'article', ], 2 => [ 'ezcontentobject_id' => '226', @@ -106,6 +108,7 @@ 'ezcontentobject_attribute_sort_key_string' => 'something', 'ezcontentobject_tree_main_node_id' => '228', 'ezcontentobject_is_hidden' => '0', + 'ezcontentclass_identifier' => 'article', ], 3 => [ 'ezcontentobject_id' => '226', @@ -142,6 +145,7 @@ 'ezcontentobject_attribute_sort_key_string' => '', 'ezcontentobject_tree_main_node_id' => '228', 'ezcontentobject_is_hidden' => '0', + 'ezcontentclass_identifier' => 'article', ], 4 => [ 'ezcontentobject_id' => '226', @@ -176,6 +180,7 @@ 'ezcontentobject_attribute_sort_key_string' => '', 'ezcontentobject_tree_main_node_id' => '228', 'ezcontentobject_is_hidden' => '0', + 'ezcontentclass_identifier' => 'article', ], 5 => [ 'ezcontentobject_id' => '226', @@ -212,6 +217,7 @@ 'ezcontentobject_attribute_sort_key_string' => '', 'ezcontentobject_tree_main_node_id' => '228', 'ezcontentobject_is_hidden' => '0', + 'ezcontentclass_identifier' => 'article', ], 6 => [ 'ezcontentobject_id' => '226', @@ -246,6 +252,7 @@ 'ezcontentobject_attribute_sort_key_string' => '', 'ezcontentobject_tree_main_node_id' => '228', 'ezcontentobject_is_hidden' => '0', + 'ezcontentclass_identifier' => 'article', ], 7 => [ 'ezcontentobject_id' => '226', @@ -280,6 +287,7 @@ 'ezcontentobject_attribute_sort_key_string' => '', 'ezcontentobject_tree_main_node_id' => '228', 'ezcontentobject_is_hidden' => '0', + 'ezcontentclass_identifier' => 'article', ], 8 => [ 'ezcontentobject_id' => '226', @@ -314,5 +322,6 @@ 'ezcontentobject_attribute_sort_key_string' => '', 'ezcontentobject_tree_main_node_id' => '228', 'ezcontentobject_is_hidden' => '0', + 'ezcontentclass_identifier' => 'article', ], ]; diff --git a/tests/lib/Persistence/Legacy/Content/_fixtures/extract_content_from_rows_multiple_versions.php b/tests/lib/Persistence/Legacy/Content/_fixtures/extract_content_from_rows_multiple_versions.php index 7acb59c8fc..632262fa9e 100644 --- a/tests/lib/Persistence/Legacy/Content/_fixtures/extract_content_from_rows_multiple_versions.php +++ b/tests/lib/Persistence/Legacy/Content/_fixtures/extract_content_from_rows_multiple_versions.php @@ -38,6 +38,7 @@ 'ezcontentobject_attribute_sort_key_string' => '', 'ezcontentobject_tree_main_node_id' => '12', 'ezcontentobject_is_hidden' => '0', + 'ezcontentclass_identifier' => 'user_group', ], 1 => [ 'ezcontentobject_id' => '11', @@ -72,6 +73,7 @@ 'ezcontentobject_attribute_sort_key_string' => '', 'ezcontentobject_tree_main_node_id' => '12', 'ezcontentobject_is_hidden' => '0', + 'ezcontentclass_identifier' => 'user_group', ], 2 => [ 'ezcontentobject_id' => '11', @@ -106,6 +108,7 @@ 'ezcontentobject_attribute_sort_key_string' => 'members', 'ezcontentobject_tree_main_node_id' => '12', 'ezcontentobject_is_hidden' => '0', + 'ezcontentclass_identifier' => 'user_group', ], 3 => [ 'ezcontentobject_id' => '11', @@ -140,5 +143,6 @@ 'ezcontentobject_attribute_sort_key_string' => '', 'ezcontentobject_tree_main_node_id' => '12', 'ezcontentobject_is_hidden' => '0', + 'ezcontentclass_identifier' => 'user_group', ], ]; diff --git a/tests/lib/Persistence/Legacy/Content/_fixtures/extract_content_from_rows_result.php b/tests/lib/Persistence/Legacy/Content/_fixtures/extract_content_from_rows_result.php index 5e3ad79b53..7829ba0c12 100644 --- a/tests/lib/Persistence/Legacy/Content/_fixtures/extract_content_from_rows_result.php +++ b/tests/lib/Persistence/Legacy/Content/_fixtures/extract_content_from_rows_result.php @@ -40,6 +40,7 @@ $versionInfo->contentInfo->name = 'Something'; $versionInfo->contentInfo->mainLocationId = 228; $versionInfo->contentInfo->status = 1; +$versionInfo->contentInfo->contentTypeIdentifier = 'article'; $content->versionInfo = $versionInfo; diff --git a/tests/lib/Persistence/Legacy/Content/_fixtures/extract_version_info_from_rows_multiple_versions.php b/tests/lib/Persistence/Legacy/Content/_fixtures/extract_version_info_from_rows_multiple_versions.php index bfe811f9ae..392413e8db 100644 --- a/tests/lib/Persistence/Legacy/Content/_fixtures/extract_version_info_from_rows_multiple_versions.php +++ b/tests/lib/Persistence/Legacy/Content/_fixtures/extract_version_info_from_rows_multiple_versions.php @@ -29,6 +29,7 @@ 'ezcontentobject_language_mask' => '3', 'ezcontentobject_is_hidden' => '0', 'ezcontentobject_version_contentobject_id' => '11', + 'ezcontentclass_identifier' => 'user_group', ], 1 => [ 'ezcontentobject_version_id' => '674', @@ -54,5 +55,6 @@ 'ezcontentobject_language_mask' => '3', 'ezcontentobject_is_hidden' => '0', 'ezcontentobject_version_contentobject_id' => '11', + 'ezcontentclass_identifier' => 'user_group', ], ];