You are here

protected function ViewsConfigUpdater::processOperatorDefaultsHandler in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/ViewsConfigUpdater.php \Drupal\views\ViewsConfigUpdater::processOperatorDefaultsHandler()

Processes operator defaults.

Parameters

array $handler: A display handler.

string $handler_type: The handler type.

Return value

bool Whether the handler was updated.

2 calls to ViewsConfigUpdater::processOperatorDefaultsHandler()
ViewsConfigUpdater::needsOperatorDefaultsUpdate in core/modules/views/src/ViewsConfigUpdater.php
Add additional settings to the entity link field.
ViewsConfigUpdater::updateAll in core/modules/views/src/ViewsConfigUpdater.php
Performs all required updates.

File

core/modules/views/src/ViewsConfigUpdater.php, line 241

Class

ViewsConfigUpdater
Provides a BC layer for modules providing old configurations.

Namespace

Drupal\views

Code

protected function processOperatorDefaultsHandler(array &$handler, $handler_type) {
  $changed = FALSE;
  if ($handler_type === 'filter') {
    if (!isset($handler['expose']['operator_limit_selection'])) {
      $handler['expose']['operator_limit_selection'] = FALSE;
      $changed = TRUE;
    }
    if (!isset($handler['expose']['operator_list'])) {
      $handler['expose']['operator_list'] = [];
      $changed = TRUE;
    }
  }
  return $changed;
}