src/Utility/BasicSearch.php
public function getCriteria(string $value): array
    {
        if ('' === trim($value)) {
            return [];
        }

        $fields = $this->getFields();
        if (empty($fields)) {
            return [];
        }

        $result = [];
        foreach ($fields as $field) {
            $criteria = $this->getFieldCriteria($field, $value);
            if (empty($criteria)) {
                continue;
            }

            $result[$field][] = $criteria;
        }

        return $result;
    }
public function getCriteria(string $value): array
    {
        if ('' === trim($value)) {
            return [];
        }

        $fields = $this->getFields();
        if (empty($fields)) {
            return [];
        }

        $result = [];
        foreach ($fields as $field) {
            $criteria = $this->getFieldCriteria($field, $value);
            if (empty($criteria)) {
                continue;
            }

            $result[$field][] = $criteria;
        }

        return $result;
    }
public function getCriteria ( string $ value ) : array { if ( '' === trim ( $ value ) ) { return [ ] ; } $ fields = $ this -> getFields ( ) ; if ( empty ( $ fields ) ) { return [ ] ; } $ result = [ ] ; foreach ( $ fields as $ field ) { $ criteria = $ this -> getFieldCriteria ( $ field , $ value ) ; if ( empty ( $ criteria ) ) { continue ; } $ result [ $ field ] [ ] = $ criteria ; } return $ result ; }
Prepare basic search query's where statement

@param string $value Search query value
@return mixed[]
Prepare basic search query s where statement