Backend\Classes\FilterScope

Source: ~/modules/backend/classes/FilterScope.php

Filter scope definition A translation of the filter scope configuration

Public properties

public string $scopeName

Scope name.

public string $idPrefix

A prefix to the field identifier so it can be totally unique.

public string $nameFrom

Column to display for the display name

public string $descriptionFrom

Column to display for the description (optional)

public string $label

Filter scope label.

public string $value

Filter scope value.

public string $type

Filter mode.

public string $options

Filter options.

public string $context

Specifies contextual visibility of this form scope.

public bool $disabled

Specify if the scope is disabled or not.

public string $defaults

Specifies a default value for supported scopes.

public string $conditions

Raw SQL conditions to use when applying this scope.

public string $scope

Model scope method to use when applying this filter scope.

public string $cssClass

Specifies a CSS class to attach to the scope container.

public array $config

Raw scope configuration.

Public methods

public void __construct($scopeName, $label)
Parameters
  • $scopeName
  • $label

public void displayAs(string $type, array $config=array())

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
  • string $type - Specifies a render mode as described above
  • array $config - A list of render mode specific config.

public void getId($suffix=NULL)

Returns a value suitable for the scope id property.

Parameters
  • $suffix

Protected methods

protected array evalConfig(array $config)

Process options and apply them to this object.

Parameters
  • array $config