' . t('Actions are individual tasks that the system can do, such as unpublishing a piece of content or banning a user. Other modules can fire these actions when certain system events happen; for example, when a new post is added or when a user logs in. Modules may also provide additional actions. Visit the Actions page to configure actions.', array('@actions' => url('admin/config/system/actions'))) . '
'; return $output; case 'admin/config/system/actions': case 'admin/config/system/actions/manage': $output = '' . t('There are two types of actions: simple and advanced. Simple actions do not require any additional configuration and are listed here automatically. Advanced actions need to be created and configured before they can be used because they have options that need to be specified; for example, sending an e-mail to a specified address or unpublishing content containing certain words. To create an advanced action, select the action from the drop-down list in the advanced action section below and click the Create button.') . '
'; return $output; case 'admin/config/system/actions/configure': return t('An advanced action offers additional configuration options which may be filled out below. Changing the Description field is recommended in order to better identify the precise action taking place.'); } } /** * Implements hook_permission(). */ function action_permission() { return array( 'administer actions' => array( 'title' => t('Administer actions'), ), ); } /** * Implements hook_menu(). */ function action_menu() { $items['admin/config/system/actions'] = array( 'title' => 'Actions', 'description' => 'Manage the actions defined for your site.', 'route_name' => 'action_admin', ); $items['admin/config/system/actions/manage'] = array( 'title' => 'Manage actions', 'description' => 'Manage the actions defined for your site.', 'type' => MENU_DEFAULT_LOCAL_TASK, ); $items['admin/config/system/actions/add'] = array( 'title' => 'Create an advanced action', 'type' => MENU_VISIBLE_IN_BREADCRUMB, 'route_name' => 'action_admin_add', ); $items['admin/config/system/actions/configure'] = array( 'title' => 'Configure an advanced action', 'type' => MENU_VISIBLE_IN_BREADCRUMB, 'route_name' => 'action_admin_configure', ); $items['admin/config/system/actions/configure/%/delete'] = array( 'title' => 'Delete action', 'description' => 'Delete an action.', 'route_name' => 'action_delete', ); return $items; } /** * Implements hook_entity_info(). */ function action_entity_info(&$entity_info) { $entity_info['action']['controllers']['form']['add'] = 'Drupal\action\ActionAddFormController'; $entity_info['action']['controllers']['form']['edit'] = 'Drupal\action\ActionEditFormController'; $entity_info['action']['controllers']['form']['delete'] = 'Drupal\action\Form\ActionDeleteForm'; $entity_info['action']['controllers']['list'] = 'Drupal\action\ActionListController'; }