src/Utility/BasicSearch.php
protected function filterFields(array $fields): array
    {
        // get table columns, aliased
        $columns = $this->table->getSchema()->columns();
        foreach ($columns as $index => $column) {
            $columns[$index] = $this->table->aliasField($column);
        }

        // filter out virtual fields
        foreach ($fields as $index => $field) {
            if (!in_array($field, $columns)) {
                unset($fields[$index]);
            }
        }

        return $fields;
    }
protected function filterFields(array $fields): array
    {
        // get table columns, aliased
        $columns = $this->table->getSchema()->columns();
        foreach ($columns as $index => $column) {
            $columns[$index] = $this->table->aliasField($column);
        }

        // filter out virtual fields
        foreach ($fields as $index => $field) {
            if (!in_array($field, $columns)) {
                unset($fields[$index]);
            }
        }

        return $fields;
    }
protected function filterFields ( array $ fields ) : array { // get table columns, aliased $ columns = $ this -> table -> getSchema ( ) -> columns ( ) ; foreach ( $ columns as $ index => $ column ) { $ columns [ $ index ] = $ this -> table -> aliasField ( $ column ) ; } // filter out virtual fields foreach ( $ fields as $ index => $ field ) { if ( ! in_array ( $ field , $ columns ) ) { unset ( $ fields [ $ index ] ) ; } } return $ fields ; }
Filters basic search fields by removing virtual ones.

@param mixed[] $fields Basic search fields
@return mixed[]
Filters basic search fields by removing virtual ones .