SilverStripe\CKANRegistry\Model\ResourceFilter
Represents a filter for a data resource, which accepts user inputted data and generates a query string (?key=value) to use in a request against a CKAN API for that particular resource in order to filter the results shown in a representation of that data.
Synopsis
class ResourceFilter
extends DataObject
{
- // members
- private static string $table_name = 'CKANFilter_Text';
- private static array $db = ;
- private static array $defaults = ;
- private static array $has_one = ;
- private static array $many_many = ;
- private static array $summary_fields = ;
- private static string $singular_name = 'Text';
- protected FormField $fieldType = TextField::class;
- // methods
- public void getCMSFields()
- public void forTemplate()
- public string getType()
- public array getClientConfig()
- public string|DBField getColumns()
- public string getTitle()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Members
private
- $db
- $defaults
- $has_one
- $many_many
- $singular_name
- $summary_fields
- $table_name
protected
- $fieldType
—
SilverStripe\Forms\FormField
Defines the type of {@link FormField} that will be used to render the filter in the CMS. This is defined in subclasses. Filters will render as TextFields by default.
Methods
public
- forTemplate() — {@inheritdoc}
- getCMSFields()
- getClientConfig() — Return a "schema" that can be provided to client side JavaScript components for client side rendering
- getColumns() — Returns either the selected column's readable label value, or a fixed string representing multiple columns having been selected.
- getTitle() — Use the filter label for GridField CRUD operation result messages
- getType() — Returns the type of the filter, used for summary fields