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 @@ -492,6 +492,23 @@ public function getAllIds()
492
492
$ idsSelect ->columns ($ this ->getResource ()->getIdFieldName (), 'main_table ' );
493
493
return $ this ->getConnection ()->fetchCol ($ idsSelect , $ this ->_bindParams );
494
494
}
495
+
496
+ /**
497
+ * Retrieve field values for collection
498
+ *
499
+ * @return array
500
+ */
501
+ public function getColumnValues ($ fieldName )
502
+ {
503
+ $ idsSelect = clone $ this ->getSelect ();
504
+ $ idsSelect ->reset (\Magento \Framework \DB \Select::ORDER );
505
+ $ idsSelect ->reset (\Magento \Framework \DB \Select::LIMIT_COUNT );
506
+ $ idsSelect ->reset (\Magento \Framework \DB \Select::LIMIT_OFFSET );
507
+ $ idsSelect ->reset (\Magento \Framework \DB \Select::COLUMNS );
508
+
509
+ $ idsSelect ->columns ($ fieldName , 'main_table ' );
510
+ return $ this ->getConnection ()->fetchCol ($ idsSelect , $ this ->_bindParams );
511
+ }
495
512
496
513
/**
497
514
* Join table to collection select
You can’t perform that action at this time.
0 commit comments