Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/action/action.module @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | a9cd425dd02b |
children |
comparison
equal
deleted
inserted
replaced
4:a9cd425dd02b | 5:12f9dff5fda9 |
---|---|
3 /** | 3 /** |
4 * @file | 4 * @file |
5 * This is the Actions module for executing stored actions. | 5 * This is the Actions module for executing stored actions. |
6 */ | 6 */ |
7 | 7 |
8 use Drupal\Core\Url; | |
8 use Drupal\Core\Routing\RouteMatchInterface; | 9 use Drupal\Core\Routing\RouteMatchInterface; |
9 | 10 |
10 /** | 11 /** |
11 * Implements hook_help(). | 12 * Implements hook_help(). |
12 */ | 13 */ |
17 $output .= '<h3>' . t('About') . '</h3>'; | 18 $output .= '<h3>' . t('About') . '</h3>'; |
18 $output .= '<p>' . t('The Actions module provides tasks that can be executed by the site such as unpublishing content, sending email messages, or blocking a user. Other modules can trigger these actions when specific system events happen; for example, when new content is posted or when a user logs in. Modules can also provide additional actions. For more information, see the <a href=":documentation">online documentation for the Actions module</a>.', [':documentation' => 'https://www.drupal.org/documentation/modules/action']) . '</p>'; | 19 $output .= '<p>' . t('The Actions module provides tasks that can be executed by the site such as unpublishing content, sending email messages, or blocking a user. Other modules can trigger these actions when specific system events happen; for example, when new content is posted or when a user logs in. Modules can also provide additional actions. For more information, see the <a href=":documentation">online documentation for the Actions module</a>.', [':documentation' => 'https://www.drupal.org/documentation/modules/action']) . '</p>'; |
19 $output .= '<h3>' . t('Uses') . '</h3>'; | 20 $output .= '<h3>' . t('Uses') . '</h3>'; |
20 $output .= '<dl>'; | 21 $output .= '<dl>'; |
21 $output .= '<dt>' . t('Using simple actions') . '</dt>'; | 22 $output .= '<dt>' . t('Using simple actions') . '</dt>'; |
22 $output .= '<dd>' . t('<em>Simple actions</em> do not require configuration and are listed automatically as available on the <a href=":actions">Actions page</a>.', [':actions' => \Drupal::url('entity.action.collection')]) . '</dd>'; | 23 $output .= '<dd>' . t('<em>Simple actions</em> do not require configuration and are listed automatically as available on the <a href=":actions">Actions page</a>.', [':actions' => Url::fromRoute('entity.action.collection')->toString()]) . '</dd>'; |
23 $output .= '<dt>' . t('Creating and configuring advanced actions') . '</dt>'; | 24 $output .= '<dt>' . t('Creating and configuring advanced actions') . '</dt>'; |
24 $output .= '<dd>' . t('<em>Advanced actions</em> are user-created and have to be configured individually. Create an advanced action on the <a href=":actions">Actions page</a> by selecting an action type from the drop-down list. Then configure your action, for example by specifying the recipient of an automated email message.', [':actions' => \Drupal::url('entity.action.collection')]) . '</dd>'; | 25 $output .= '<dd>' . t('<em>Advanced actions</em> are user-created and have to be configured individually. Create an advanced action on the <a href=":actions">Actions page</a> by selecting an action type from the drop-down list. Then configure your action, for example by specifying the recipient of an automated email message.', [':actions' => Url::fromRoute('entity.action.collection')->toString()]) . '</dd>'; |
25 $output .= '</dl>'; | 26 $output .= '</dl>'; |
26 return $output; | 27 return $output; |
27 | 28 |
28 case 'entity.action.collection': | 29 case 'entity.action.collection': |
29 $output = '<p>' . 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 email 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 <em>Create</em> button.') . '</p>'; | 30 $output = '<p>' . 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 email 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 <em>Create</em> button.') . '</p>'; |