You are here

function scheduler_update_8102 in Scheduler 8

Same name and namespace in other branches
  1. 2.x scheduler.install \scheduler_update_8102()

Update view - Move 'Scheduled' tab to be a local task under 'Content'.

File

./scheduler.install, line 118
Installation file for Scheduler module.

Code

function scheduler_update_8102() {

  // The text in the doc block above is shown on the update.php list.
  // See https://www.drupal.org/project/scheduler/issues/3167193
  $view = View::load('scheduler_scheduled_content');
  if ($view) {
    $display =& $view
      ->getDisplay('overview');
    $display['display_options']['menu']['description'] = 'Content scheduled for publishing and unpublishing';
    $display['display_options']['menu']['type'] = 'normal';
    $view
      ->save();
    return t('The "Scheduled" tab is now a "Scheduled content" sub-task under the "Content" tab');
  }
}