src/Utility/BasicSearch.php
protected function getFieldCriteria(string $field, string $value): array
    {
        // not a searchable field
        if (!array_key_exists($field, $this->searchFields)) {
            return [];
        }

        // unsupported field type for basic search
        $type = $this->searchFields[$field]['type'];
        if (!in_array($type, Options::getBasicSearchFieldTypes())) {
            return [];
        }

        $result = [];
        switch ($type) {
            case 'related':
                $result = $this->getRelatedFieldValue($field, $value);
                break;

            default:
                $result = $this->getFieldValue($field, $value);
                break;
        }

        return $result;
    }
protected function getFieldCriteria(string $field, string $value): array
    {
        // not a searchable field
        if (!array_key_exists($field, $this->searchFields)) {
            return [];
        }

        // unsupported field type for basic search
        $type = $this->searchFields[$field]['type'];
        if (!in_array($type, Options::getBasicSearchFieldTypes())) {
            return [];
        }

        $result = [];
        switch ($type) {
            case 'related':
                $result = $this->getRelatedFieldValue($field, $value);
                break;

            default:
                $result = $this->getFieldValue($field, $value);
                break;
        }

        return $result;
    }
protected function getFieldCriteria ( string $ field , string $ value ) : array { // not a searchable field if ( ! array_key_exists ( $ field , $ this -> searchFields ) ) { return [ ] ; } // unsupported field type for basic search $ type = $ this -> searchFields [ $ field ] [ 'type' ] ; if ( ! in_array ( $ type , Options :: getBasicSearchFieldTypes ( ) ) ) { return [ ] ; } $ result = [ ] ; switch ( $ type ) { case 'related' : $ result = $ this -> getRelatedFieldValue ( $ field , $ value ) ; break ; default : $ result = $ this -> getFieldValue ( $ field , $ value ) ; break ; } return $ result ; }
Field criteria getter for basic search field.

@param string $field Field name
@param string $value Search query value
@return mixed[]
Field criteria getter for basic search field .