You are here

function views_post_update_bulk_field_moved in Drupal 8

Update dependencies for moved bulk field plugin.

File

core/modules/views/views.post_update.php, line 238
Post update functions for Views.

Code

function views_post_update_bulk_field_moved() {
  $views = View::loadMultiple();
  array_walk($views, function (View $view) {
    $old_dependencies = $view
      ->getDependencies();
    $new_dependencies = $view
      ->calculateDependencies()
      ->getDependencies();
    if ($old_dependencies !== $new_dependencies) {
      $view
        ->save();
    }
  });
}