You are here

function thunder_post_update_remove_scheduler_menu_entry in Thunder 8.5

Remove thunder_article.settings and scheduler menu entry.

File

./thunder.post_update.php, line 13
Thunder post_update hooks.

Code

function thunder_post_update_remove_scheduler_menu_entry(&$sandbox) {
  \Drupal::configFactory()
    ->getEditable('thunder_article.settings')
    ->delete();
  $view = View::load('scheduler_scheduled_content');
  if ($view) {
    $display =& $view
      ->getDisplay('overview');
    $display['display_options']['menu']['type'] = 'none';
    $view
      ->save();
    return t('The "Scheduled" menu entry was removed.');
  }
}