39 lines
864 B
PHP
39 lines
864 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace Stemcell\Customer\Model\ResourceModel\Salesperson;
|
|
|
|
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
|
|
|
|
class Collection extends AbstractCollection
|
|
{
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
protected $_idFieldName = 'salesperson_id';
|
|
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
protected function _construct()
|
|
{
|
|
$this->_init(
|
|
\Stemcell\Customer\Model\Salesperson::class,
|
|
\Stemcell\Customer\Model\ResourceModel\Salesperson::class
|
|
);
|
|
}
|
|
|
|
/**
|
|
* @param $valueField
|
|
* @param $labelField
|
|
* @param $additional
|
|
* @return array
|
|
*/
|
|
protected function _toOptionArray($valueField = 'salesperson_id', $labelField = 'name', $additional = [])
|
|
{
|
|
return parent::_toOptionArray($valueField, $labelField, $additional);
|
|
}
|
|
}
|
|
|