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

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

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

Filter mode.

public $value : string

Filter scope value.

Methods

public __construct ($scopeName, $label)

Parameters
Property Description
$scopeName
mixed
$label
mixed
Returns
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.
Parameters
Property Description
$type
string

Specifies a render mode as described above

$config
array

A list of render mode specific config.

Returns
mixed

public getId ($suffix = null)

Returns a value suitable for the scope id property.

Parameters
Property Description
$suffix
mixed
Returns
mixed

protected evalConfig (array $config) : array

Process options and apply them to this object.

Parameters
Property Description
$config
array
Returns
array
Copyright © 2024 Winter CMS