You are here

public function SyncState::operators in CMS Content Sync 2.0.x

Same name and namespace in other branches
  1. 8 modules/cms_content_sync_views/src/Plugin/views/filter/SyncState.php \Drupal\cms_content_sync_views\Plugin\views\filter\SyncState::operators()
  2. 2.1.x modules/cms_content_sync_views/src/Plugin/views/filter/SyncState.php \Drupal\cms_content_sync_views\Plugin\views\filter\SyncState::operators()

This kind of construct makes it relatively easy for a child class to add or remove functionality by overriding this function and adding/removing items from this array.

Overrides InOperator::operators

File

modules/cms_content_sync_views/src/Plugin/views/filter/SyncState.php, line 67

Class

SyncState
Provides a view filter to filter on the sync state entity.

Namespace

Drupal\cms_content_sync_views\Plugin\views\filter

Code

public function operators() {
  $operators = [
    'in' => [
      'title' => $this
        ->t('Is one of'),
      'short' => $this
        ->t('in'),
      'short_single' => $this
        ->t('='),
      'method' => 'opSimple',
      'values' => 1,
    ],
  ];
  return $operators;
}