protected function _toOptionArray($valueField = 'job_code', $labelField = 'name', $additional = array())
    {
        $options = array();

        $additional['value'] = $valueField;
        $additional['label'] = $labelField;

        foreach ($this as $item) {
            /** @var Aoe_Scheduler_Model_Job $item */
            $data = array();
            foreach ($additional as $code => $field) {
                $data[$code] = $item->getDataUsingMethod($field);
            }
            $options[] = $data;
        }
        return $options;
    }
protected function _toOptionArray($valueField = 'job_code', $labelField = 'name', $additional = array())
    {
        $options = array();

        $additional['value'] = $valueField;
        $additional['label'] = $labelField;

        foreach ($this as $item) {
            /** @var Aoe_Scheduler_Model_Job $item */
            $data = array();
            foreach ($additional as $code => $field) {
                $data[$code] = $item->getDataUsingMethod($field);
            }
            $options[] = $data;
        }
        return $options;
    }
protected function _toOptionArray ( $ valueField = 'job_code' , $ labelField = 'name' , $ additional = array ( ) ) { $ options = array ( ) ; $ additional [ 'value' ] = $ valueField ; $ additional [ 'label' ] = $ labelField ; foreach ( $ this as $ item ) { /** @var Aoe_Scheduler_Model_Job $item */ $ data = array ( ) ; foreach ( $ additional as $ code => $ field ) { $ data [ $ code ] = $ item -> getDataUsingMethod ( $ field ) ; } $ options [ ] = $ data ; } return $ options ; }
Convert items array to array for select options

@param   string $valueField
@param   string $labelField

@return  array
Convert items array to array for select options