FilterScope
Filter scope definition
A translation of the filter scope configuration
class Backend\Classes\FilterScope
Properties
public $conditions : string
Raw SQL conditions to use when applying this scope.
public $config : array
Raw scope configuration.
public $context : string
Specifies contextual visibility of this form scope.
public $cssClass : string
Specifies a CSS class to attach to the scope container.
public $defaults : string
Specifies a default value for supported scopes.
public $dependsOn : array
Other scope names this scope depends on, when the other scopes are modified, this scope will update.
public $descriptionFrom : string
Column to display for the description (optional)
public
$disabled
:
bool
= false
Specify if the scope is disabled or not.
public $idPrefix : string
A prefix to the field identifier so it can be totally unique.
public $label : string
Filter scope label.
public
$nameFrom
:
string
= "name"
Column to display for the display name
public $options : string
Filter options.
public $scope : string
Model scope method to use when applying this filter scope.
public $scopeName : string
Scope name.
public
$type
:
string
= "group"
Filter mode.
public $value : string
Filter scope value.
Methods
public __construct ($scopeName, $label)
Property | Type | Description |
---|---|---|
$scopeName | mixed |
mixed
|
$label | mixed |
mixed
|
public
displayAs (string $type, array $config = []
)
Specifies a scope control rendering mode. Supported modes are:
- group - filter by a group of IDs. Default.
- checkbox - filter by a simple toggle switch.
Property | Type | Description |
---|---|---|
$type | string |
string
Specifies a render mode as described above |
$config | array |
array
A list of render mode specific config. |
public
getId ($suffix = null
)
Returns a value suitable for the scope id property.
Property | Type | Description |
---|---|---|
$suffix | mixed |
mixed
|
protected evalConfig (array $config) : array
Process options and apply them to this object.
Property | Type | Description |
---|---|---|
$config | array |
array
|