Tools\Model\Table\Table::getFieldInUse PHP Method

getFieldInUse() public method

Get all fields that have been used so far
public getFieldInUse ( string $groupField, string $type = 'all', array $options = [] ) : Query
$groupField string Field to group by
$type string Find type
$options array
return Cake\ORM\Query
    public function getFieldInUse($groupField, $type = 'all', array $options = [])
    {
        $defaults = ['group' => $groupField, 'order' => [$this->displayField() => 'ASC']];
        if ($type === 'list') {
            $defaults['fields'] = ['' . $this->primaryKey(), '' . $this->displayField()];
        }
        $options += $defaults;
        return $this->find($type, $options);
    }