You are here

public function Update230::enableModerationSidebar in Lightning Workflow 8.2

Same name and namespace in other branches
  1. 8.3 src/Update/Update230.php \Drupal\lightning_workflow\Update\Update230::enableModerationSidebar()

Enables the Moderation Sidebar module.

@update

@ask Do you want to enable the Moderation Sidebar module? This will also install the Toolbar module and allow reviewers to use it.

File

src/Update/Update230.php, line 89

Class

Update230
Plugin annotation @Update("2.3.0");

Namespace

Drupal\lightning_workflow\Update

Code

public function enableModerationSidebar() {
  $this->moduleInstaller
    ->install([
    'moderation_sidebar',
    'toolbar',
  ]);
  if ($this->contentRoleManager) {
    $this->contentRoleManager
      ->grantPermissions('creator', [
      'use moderation sidebar',
    ])
      ->grantPermissions('reviewer', [
      'access toolbar',
      'use moderation sidebar',
    ]);
  }
}