function tmgmt_update_8010

Update the job messages view to use a different pager id.

File

./tmgmt.install, line 139
Update function for the tmgmt module.

Code

function tmgmt_update_8010() {
  $config = \Drupal::configFactory()
    ->getEditable('views.view.tmgmt_job_messages');

  // Set the pager id to 1 to avoid conflicts with the job items view.
  if (!$config
    ->isNew()) {
    $config
      ->set('display.default.display_options.pager.options.id', 1);
    $config
      ->save(TRUE);
  }
}