src/TableColumn/FilterModel/Generic.php
public static function factoryType($field)
    {
        $data = [];
        $persistence = new Persistence_Array($data);
        $filterDomain = 'atk4\\ui\\TableColumn\\FilterModel\Type';

        // check if field as a type and use string as default
        if (empty($type = $field->type)) {
            $type = 'string';
        }
        $class = $filterDomain.ucfirst($type);

        /*
         * You can set your own filter model condition by extending
         * Field class and setting your filter model class.
         */
        if (!empty($field->filterModel) && isset($field->filterModel)) {
            if ($field->filterModel instanceof Model) {
                return $field->filterModel;
            }
            $class = $field->filterModel;
        }

        return new $class($persistence, ['lookupField' => $field]);
    }
public static function factoryType($field)
    {
        $data = [];
        $persistence = new Persistence_Array($data);
        $filterDomain = 'atk4\\ui\\TableColumn\\FilterModel\Type';

        // check if field as a type and use string as default
        if (empty($type = $field->type)) {
            $type = 'string';
        }
        $class = $filterDomain.ucfirst($type);

        /*
         * You can set your own filter model condition by extending
         * Field class and setting your filter model class.
         */
        if (!empty($field->filterModel) && isset($field->filterModel)) {
            if ($field->filterModel instanceof Model) {
                return $field->filterModel;
            }
            $class = $field->filterModel;
        }

        return new $class($persistence, ['lookupField' => $field]);
    }
public static function factoryType ( $ field ) { $ data = [ ] ; $ persistence = new Persistence_Array ( $ data ) ; $ filterDomain = 'atk4\\ui\\TableColumn\\FilterModel\Type' ; // check if field as a type and use string as default if ( empty ( $ type = $ field -> type ) ) { $ type = 'string' ; } $ class = $ filterDomain . ucfirst ( $ type ) ; /*
         * You can set your own filter model condition by extending
         * Field class and setting your filter model class.
         */ if ( ! empty ( $ field -> filterModel ) && isset ( $ field -> filterModel ) ) { if ( $ field -> filterModel instanceof Model ) { return $ field -> filterModel ; } $ class = $ field -> filterModel ; } return new $ class ( $ persistence , [ 'lookupField' => $ field ] ) ; }
Factory method that will return a FilerModel Type class.

@param Field       $field
@param Persistence $persistence

@return mixed
Factory method that will return a FilerModel Type class .