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