src/Model/Table/Table.php
public function getFieldInUse($groupField, $type = 'all', array $options = []) {
		$defaults = [
			'group' => $groupField,
			'order' => [$this->getDisplayField() => 'ASC'],
		];
		if ($type === 'list') {
			$defaults['fields'] = ['' . $this->getPrimaryKey(), '' . $this->getDisplayField()];
		}
		$options += $defaults;
		return $this->find($type, $options);
	}
public function getFieldInUse($groupField, $type = 'all', array $options = []) {
		$defaults = [
			'group' => $groupField,
			'order' => [$this->getDisplayField() => 'ASC'],
		];
		if ($type === 'list') {
			$defaults['fields'] = ['' . $this->getPrimaryKey(), '' . $this->getDisplayField()];
		}
		$options += $defaults;
		return $this->find($type, $options);
	}
public function getFieldInUse ( $ groupField , $ type = 'all' , array $ options = [ ] ) { $ defaults = [ 'group' => $ groupField , 'order' => [ $ this -> getDisplayField ( ) => 'ASC' ] , ] ; if ( $ type === 'list' ) { $ defaults [ 'fields' ] = [ '' . $ this -> getPrimaryKey ( ) , '' . $ this -> getDisplayField ( ) ] ; } $ options += $ defaults ; return $ this -> find ( $ type , $ options ) ; }
Get all fields that have been used so far

@param string $groupField Field to group by
@param string $type Find type
@param array $options
@return \Cake\ORM\Query
Get all fields that have been used so far