src/Utility.php
public function getSearchableFields(RepositoryInterface $table, array $user) : array
    {
        $alias = $table->getAlias();

        if (!empty($this->searchableFields[$alias])) {
            return $this->searchableFields[$alias];
        }

        $event = new Event((string)EventName::MODEL_SEARCH_SEARCHABLE_FIELDS(), $this, [
            'table' => $table,
            'user' => $user
        ]);
        EventManager::instance()->dispatch($event);

        $this->searchableFields[$alias] = $event->result ? $event->result : [];

        return $this->searchableFields[$alias];
    }
public function getSearchableFields(RepositoryInterface $table, array $user) : array
    {
        $alias = $table->getAlias();

        if (!empty($this->searchableFields[$alias])) {
            return $this->searchableFields[$alias];
        }

        $event = new Event((string)EventName::MODEL_SEARCH_SEARCHABLE_FIELDS(), $this, [
            'table' => $table,
            'user' => $user
        ]);
        EventManager::instance()->dispatch($event);

        $this->searchableFields[$alias] = $event->result ? $event->result : [];

        return $this->searchableFields[$alias];
    }
public function getSearchableFields ( RepositoryInterface $ table , array $ user ) : array { $ alias = $ table -> getAlias ( ) ; if ( ! empty ( $ this -> searchableFields [ $ alias ] ) ) { return $ this -> searchableFields [ $ alias ] ; } $ event = new Event ( ( string ) EventName :: MODEL_SEARCH_SEARCHABLE_FIELDS ( ) , $ this , [ 'table' => $ table , 'user' => $ user ] ) ; EventManager :: instance ( ) -> dispatch ( $ event ) ; $ this -> searchableFields [ $ alias ] = $ event -> result ? $ event -> result : [ ] ; return $ this -> searchableFields [ $ alias ] ; }
Return Table's searchable fields.

@param \Cake\Datasource\RepositoryInterface $table Table object
@param mixed[] $user User info
@return mixed[]
Return Table s searchable fields .