summaryrefslogtreecommitdiffstats
path: root/core/modules/content_moderation/content_moderation.module
diff options
context:
space:
mode:
authorxjm2018-01-27 13:04:05 (GMT)
committerxjm2018-01-27 13:04:29 (GMT)
commit780164e87904208675609ba056bca3e30ee33272 (patch)
treec28f2d06008f0893621e56e49789827d28901a87 /core/modules/content_moderation/content_moderation.module
parent490ad560342d9f2c8a8b653b8239338f4536b234 (diff)
Issue #2897132 by timmillwood, Sam152, amateescu, pameeela, xjm, Wim Leers, webchick, lauriii, esod: Mark Content Moderation module as stable
Diffstat (limited to 'core/modules/content_moderation/content_moderation.module')
-rw-r--r--core/modules/content_moderation/content_moderation.module17
1 files changed, 13 insertions, 4 deletions
diff --git a/core/modules/content_moderation/content_moderation.module b/core/modules/content_moderation/content_moderation.module
index 2ae1e0d..985f91f 100644
--- a/core/modules/content_moderation/content_moderation.module
+++ b/core/modules/content_moderation/content_moderation.module
@@ -20,10 +20,12 @@ use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Session\AccountInterface;
+use Drupal\Core\Url;
use Drupal\workflows\WorkflowInterface;
use Drupal\Core\Action\Plugin\Action\PublishAction;
use Drupal\Core\Action\Plugin\Action\UnpublishAction;
use Drupal\workflows\Entity\Workflow;
+use Drupal\views\Entity\View;
/**
* Implements hook_help().
@@ -34,13 +36,20 @@ function content_moderation_help($route_name, RouteMatchInterface $route_match)
case 'help.page.content_moderation':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
- $output .= '<p>' . t('The Content Moderation module provides moderation for content by applying workflows to content. For more information, see the <a href=":content_moderation">online documentation for the Content Moderation module</a>.', [':content_moderation' => 'https://www.drupal.org/documentation/modules/content_moderation']) . '</p>';
+ $output .= '<p>' . t('The Content Moderation module allows you to expand on Drupal\'s "unpublished" and "published" states for content. It allows you to have a published version that is live, but have a separate working copy that is undergoing review before it is published. This is achieved by using <a href=":workflows">Workflows</a> to apply different states and transitions to entities as needed. For more information, see the <a href=":content_moderation">online documentation for the Content Moderation module</a>.', [':content_moderation' => 'https://www.drupal.org/documentation/modules/content_moderation', ':workflows' => Url::fromRoute('help.page', ['name' => 'workflows'])->toString()]) . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
- $output .= '<dt>' . t('Configuring workflows') . '</dt>';
- $output .= '<dd>' . t('Enable the Workflow UI module to create, edit and delete content moderation workflows.') . '</p>';
+ $output .= '<dt>' . t('Applying workflows') . '</dt>';
+ $output .= '<dd>' . t('Content Moderation allows you to apply <a href=":workflows">Workflows</a> to content, custom blocks, and other <a href=":field_help" title="Field module help, with background on content entities">content entities</a>, to provide more fine-grained publishing options. For example, a Basic page might have states such as Draft and Published, with allowed transitions such as Draft to Published (making the current revision "live"), and Published to Draft (making a new draft revision of published content).', [':workflows' => Url::fromRoute('help.page', ['name' => 'workflows'])->toString(), ':field_help' => Url::fromRoute('help.page', ['name' => 'field'])->toString()]) . '</dd>';
+ if (\Drupal::moduleHandler()->moduleExists('views')) {
+ $moderated_content_view = View::load('moderated_content');
+ if (isset($moderated_content_view) && $moderated_content_view->status() === TRUE) {
+ $output .= '<dt>' . t('Moderating content') . '</dt>';
+ $output .= '<dd>' . t('You can view a list of content awaiting moderation on the <a href=":moderated">moderated content page</a>. This will show any content in an unpublished state, such as Draft or Archived, to help surface content that requires more work from content editors.', [':moderated' => Url::fromRoute('view.moderated_content.moderated_content')->toString()]) . '</dd>';
+ }
+ }
$output .= '<dt>' . t('Configure Content Moderation permissions') . '</dt>';
- $output .= '<dd>' . t('Each transition is exposed as a permission. If a user has the permission for a transition, then they can move that node from the start state to the end state') . '</p>';
+ $output .= '<dd>' . t('Each transition is exposed as a permission. If a user has the permission for a transition, they can use the transition to change the state of the content item, from Draft to Published.') . '</dd>';
$output .= '</dl>';
return $output;
}