SilverStripe\CKANRegistry\Forms\PresentedOptionsField
A PresentedOptionsField renders either a list of options that can be chosen for a {@link DropdownFilter}, or a text area allowing free text entry per line.
The values of these options are serialised and saved as JSON.
Synopsis
class PresentedOptionsField
extends TextField
{
- // constants
- const SELECT_TYPE_ALL = 0;
- const SELECT_TYPE_CUSTOM = 1;
- const SELECT_TYPE_DEFAULT = self::SELECT_TYPE_ALL;
- // members
- protected string $schemaComponent = 'PresentedOptions';
- protected Resource $resource;
- // methods
- public void __construct()
- public void Type()
- public void getSchemaDataDefaults()
- public static array getSelectTypes()
- public void performReadonlyTransformation()
- public Resource getResource()
- public $this setResource()
Hierarchy
Extends
- SilverStripe\Forms\TextField
Constants
Name | Value |
---|---|
SELECT_TYPE_ALL | 0 |
SELECT_TYPE_CUSTOM | 1 |
SELECT_TYPE_DEFAULT | self::SELECT_TYPE_ALL |
Members
protected
- $resource
—
SilverStripe\CKANRegistry\Model\Resource
The resource that this options field will suggest options from - $schemaComponent
Methods
public
- __construct()
- Type()
- getResource()
- getSchemaDataDefaults()
- getSelectTypes() — Get a list of options for filtering with a human readable (translated) label
- performReadonlyTransformation()
- setResource()