protected function ViewsConfigUpdater::processOperatorDefaultsHandler in Drupal 9
Same name and namespace in other branches
- 8 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.
\Drupal\views\ViewEntityInterface $view: The View being updated.
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 290
Class
- ViewsConfigUpdater
- Provides a BC layer for modules providing old configurations.
Namespace
Drupal\viewsCode
protected function processOperatorDefaultsHandler(array &$handler, $handler_type, ViewEntityInterface $view) {
$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;
}
}
$deprecations_triggered =& $this->triggeredDeprecations['2869168'][$view
->id()];
if ($this->deprecationsEnabled && $changed && !$deprecations_triggered) {
$deprecations_triggered = TRUE;
@trigger_error(sprintf('The operator defaults update for the "%s" view is deprecated in drupal:9.0.0 and is removed from drupal:10.0.0. Module-provided Views configuration should be updated to accommodate the changes described at https://www.drupal.org/node/2869168.', $view
->id()), E_USER_DEPRECATED);
}
return $changed;
}