src/Titon/Db/Query.php
public function lists($value = null, $key = null, array $options = []) {
        $repo = $this->getRepository();
        $key = $key ?: $repo->getPrimaryKey();
        $value = $value ?: $repo->getDisplayField();

        $options['key'] = $key;
        $options['value'] = $value;

        return $this->fields([$key, $value], true)->find('list', $options);
    }
public function lists($value = null, $key = null, array $options = []) {
        $repo = $this->getRepository();
        $key = $key ?: $repo->getPrimaryKey();
        $value = $value ?: $repo->getDisplayField();

        $options['key'] = $key;
        $options['value'] = $value;

        return $this->fields([$key, $value], true)->find('list', $options);
    }
public function lists ( $ value = null , $ key = null , array $ options = [ ] ) { $ repo = $ this -> getRepository ( ) ; $ key = $ key ? : $ repo -> getPrimaryKey ( ) ; $ value = $ value ? : $ repo -> getDisplayField ( ) ; $ options [ 'key' ] = $ key ; $ options [ 'value' ] = $ value ; return $ this -> fields ( [ $ key , $ value ] , true ) -> find ( 'list' , $ options ) ; }
Return all records as a key value list.

@param string $value
@param string $key
@param array $options
@return array
Return all records as a key value list .