You are here

protected function WebformEntityBulkForm::getActions in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Form/WebformEntityBulkForm.php \Drupal\webform\Form\WebformEntityBulkForm::getActions()

Get the entity type's actions

Return value

\Drupal\system\ActionConfigEntityInterface[] An associative array of actions.

Overrides WebformBulkFormBase::getActions

File

src/Form/WebformEntityBulkForm.php, line 18

Class

WebformEntityBulkForm
Provides the webform bulk form.

Namespace

Drupal\webform\Form

Code

protected function getActions() {
  $actions = parent::getActions();
  $is_archived = $this
    ->getRequest()->query
    ->get('state') === 'archived';
  if ($is_archived) {
    unset($actions['webform_archive_action'], $actions['webform_open_action'], $actions['webform_close_action']);
  }
  else {
    unset($actions['webform_unarchive_action']);
  }
  return $actions;
}