You are here

public function ViewsConfigUpdater::updateAll in Drupal 9

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

Performs all required updates.

Parameters

\Drupal\views\ViewEntityInterface $view: The View to update.

Return value

bool Whether the view was updated.

File

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

Class

ViewsConfigUpdater
Provides a BC layer for modules providing old configurations.

Namespace

Drupal\views

Code

public function updateAll(ViewEntityInterface $view) {
  return $this
    ->processDisplayHandlers($view, FALSE, function (&$handler, $handler_type, $key, $display_id) use ($view) {
    $changed = FALSE;
    if ($this
      ->processEntityLinkUrlHandler($handler, $handler_type, $view)) {
      $changed = TRUE;
    }
    if ($this
      ->processOperatorDefaultsHandler($handler, $handler_type, $view)) {
      $changed = TRUE;
    }
    if ($this
      ->processMultivalueBaseFieldHandler($handler, $handler_type, $key, $display_id, $view)) {
      $changed = TRUE;
    }
    if ($this
      ->processSortFieldIdentifierUpdateHandler($handler, $handler_type)) {
      $changed = TRUE;
    }
    return $changed;
  });
}