File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
app/code/Magento/Cms/Model/ResourceModel/Block Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -78,4 +78,24 @@ protected function _renderFiltersBefore()
78
78
$ entityMetadata = $ this ->metadataPool ->getMetadata (BlockInterface::class);
79
79
$ this ->joinStoreRelationTable ('cms_block_store ' , $ entityMetadata ->getLinkField ());
80
80
}
81
+
82
+ /**
83
+ * Create all ids retrieving select with limitation
84
+ * Backward compatibility with EAV collection
85
+ *
86
+ * @param int $limit
87
+ * @param int $offset
88
+ * @return \Magento\Eav\Model\Entity\Collection\AbstractCollection
89
+ */
90
+ protected function _getAllIdsSelect ($ limit = null , $ offset = null )
91
+ {
92
+ $ idsSelect = clone $ this ->getSelect ();
93
+ $ idsSelect ->reset (\Magento \Framework \DB \Select::ORDER );
94
+ $ idsSelect ->reset (\Magento \Framework \DB \Select::LIMIT_COUNT );
95
+ $ idsSelect ->reset (\Magento \Framework \DB \Select::LIMIT_OFFSET );
96
+ $ idsSelect ->reset (\Magento \Framework \DB \Select::COLUMNS );
97
+ $ idsSelect ->columns ($ this ->getResource ()->getIdFieldName (), 'main_table ' );
98
+ $ idsSelect ->limit ($ limit , $ offset );
99
+ return $ idsSelect ;
100
+ }
81
101
}
You can’t perform that action at this time.
0 commit comments