You are here

public static function ActionsHelper::getActionOptions in Node expire 7.2

Makes Action options array for Form UI.

1 call to ActionsHelper::getActionOptions()
FormHookHandler::hookFormNodeTypeFormAlter in src/Module/Hook/FormHookHandler.php
Implements hook_form_node_type_form_alter().

File

src/Module/CommonExpire/Actions/ActionsHelper.php, line 18
ActionsHelper class.

Class

ActionsHelper
ActionsHelper class.

Namespace

Drupal\node_expire\Module\CommonExpire\Actions

Code

public static function getActionOptions() {
  $arr = array();

  // 0.
  $arr[ActionTypeEnum::NONE] = t('None (do nothing)');

  // 1.
  if (module_exists('rules')) {
    $arr[ActionTypeEnum::RULES_EVENT] = t('Invoke Rules event');
  }

  // 2.
  $arr[ActionTypeEnum::NODE_PUBLISH] = t('Node publish');

  // 3.
  $arr[ActionTypeEnum::NODE_UNPUBLISH] = t('Node unpublish');

  // 4.
  $arr[ActionTypeEnum::NODE_STICKY] = t('Make node sticky');

  // 5.
  $arr[ActionTypeEnum::NODE_UNSTICKY] = t('Make node unsticky');

  // 6.
  $arr[ActionTypeEnum::NODE_PROMOTE_TO_FRONT] = t('Promote node to front page');

  // 7.
  $arr[ActionTypeEnum::NODE_REMOVE_FROM_FRONT] = t('Remove node from front page');
  return $arr;
}