You are here

function workbench_update_8001 in Workbench 8

Add a menu for Workbench.

File

./workbench.install, line 18
Uninstall config.

Code

function workbench_update_8001(&$sandbox) {
  $config_factory = \Drupal::configFactory();
  $config = $config_factory
    ->getEditable('system.menu.workbench');
  $config
    ->set('id', 'workbench');
  $config
    ->set('label', 'Workbench');
  $config
    ->set('description', 'The editorial workbench.');
  $config
    ->set('langcode', 'en');
  $config
    ->set('locked', TRUE);
  $config
    ->save(TRUE);
}