You are here

protected function WebformBulkFormBase::getActions in Webform 8.5

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

Get the entity type's actions

Return value

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

4 calls to WebformBulkFormBase::getActions()
WebformBulkFormBase::getBulkOptions in src/Form/WebformBulkFormBase.php
Returns the available operations for this form.
WebformBulkFormBase::submitForm in src/Form/WebformBulkFormBase.php
Form submission handler.
WebformEntityBulkForm::getActions in src/Form/WebformEntityBulkForm.php
Get the entity type's actions
WebformSubmissionBulkForm::getActions in src/Form/WebformSubmissionBulkForm.php
Get the entity type's actions
2 methods override WebformBulkFormBase::getActions()
WebformEntityBulkForm::getActions in src/Form/WebformEntityBulkForm.php
Get the entity type's actions
WebformSubmissionBulkForm::getActions in src/Form/WebformSubmissionBulkForm.php
Get the entity type's actions

File

src/Form/WebformBulkFormBase.php, line 176

Class

WebformBulkFormBase
Provides the webform bulk form base.

Namespace

Drupal\webform\Form

Code

protected function getActions() {
  if (!isset($this->actions)) {
    $this->actions = [];
    $action_ids = $this
      ->configFactory()
      ->get('webform.settings')
      ->get('settings.' . $this->entityTypeId . '_bulk_form_actions') ?: [];
    if ($action_ids) {

      /** @var \Drupal\system\ActionConfigEntityInterface[] $actions */
      $actions = $this->entityTypeManager
        ->getStorage('action')
        ->loadMultiple($action_ids);
      $this->actions = array_filter($actions, function ($action) {
        return $action
          ->getType() === $this->entityTypeId;
      });
    }
  }
  return $this->actions;
}