In cakephp 2.x in beforeFind I could check if some condition is set by
!empty($queryData['conditions'][$this->alias.'.field'])
or get the list of fields that would be retrived simply by $queryData['fields']
. How to achieve this in cakephp 3.x ?
In beforeFind
public function beforeFind(Event $event, Query $query, $options, $primary)
{
}
the options
is empty. The $query
I can use to add conditions by $query->where(...)
, but how to check what fields are set to be retrieved or what conditions are already applied ?
Thanks