File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
lib/internal/Magento/Framework/Model/ResourceModel/Db/Collection Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -500,6 +500,23 @@ public function getAllIds()
500
500
$ idsSelect ->columns ($ this ->getResource ()->getIdFieldName (), 'main_table ' );
501
501
return $ this ->getConnection ()->fetchCol ($ idsSelect , $ this ->_bindParams );
502
502
}
503
+
504
+ /**
505
+ * Retrieve field values for collection
506
+ *
507
+ * @return array
508
+ */
509
+ public function getColumnValues ($ fieldName )
510
+ {
511
+ $ idsSelect = clone $ this ->getSelect ();
512
+ $ idsSelect ->reset (\Magento \Framework \DB \Select::ORDER );
513
+ $ idsSelect ->reset (\Magento \Framework \DB \Select::LIMIT_COUNT );
514
+ $ idsSelect ->reset (\Magento \Framework \DB \Select::LIMIT_OFFSET );
515
+ $ idsSelect ->reset (\Magento \Framework \DB \Select::COLUMNS );
516
+
517
+ $ idsSelect ->columns ($ fieldName , 'main_table ' );
518
+ return $ this ->getConnection ()->fetchCol ($ idsSelect , $ this ->_bindParams );
519
+ }
503
520
504
521
/**
505
522
* Join table to collection select
You can’t perform that action at this time.
0 commit comments