bulkCollectionFactory = $bulkCollection; $this->userContext = $userContext; } /** * {@inheritdoc} */ public function toOptionArray() { /** @var \Magento\AsynchronousOperations\Model\ResourceModel\Bulk\Collection $collection */ $collection = $this->bulkCollectionFactory->create(); /** @var \Magento\Framework\DB\Select $select */ $select = $collection->getSelect(); $select->reset(); $select->distinct(true); $select->from($collection->getMainTable(), ['description']); $select->where('user_id = ?', $this->userContext->getUserId()); $options = []; /** @var BulkSummaryInterface $item */ foreach ($collection->getItems() as $item) { $options[] = [ 'value' => $item->getDescription(), 'label' => $item->getDescription() ]; } return $options; } }