You are here

function workflow_access_help in Workflow 8

Same name and namespace in other branches
  1. 7.2 workflow_access/workflow_access.module \workflow_access_help()

Implements hook_help().

File

modules/workflow_access/workflow_access.module, line 20
Provides node access permissions based on workflow states.

Code

function workflow_access_help($route_name, RouteMatchInterface $route_match) {
  $output = '';
  switch ($route_name) {
    case 'entity.workflow_type.access_form':
      $url = Url::fromRoute('workflow.access.settings');
      $output .= t('This page lets you refine the permissions per role and per
         workflow state. Although the workflow module allows you to add multiple
         workflows to per entity type, Workflow Access supports only one
         workflow per entity type.');
      $output .= "<br>";
      $output .= t("WARNING: Use of the 'Edit any', 'Edit own', and even 'View\n         published content' permissions for the content type may override these\n         access settings. You may disable those permissions or\n         <a href=':url'>alter the priority of\n        the Workflow access module</a>.", [
        ':url' => $url
          ->toString(),
      ]);
      if (\Drupal::moduleHandler()
        ->moduleExists('og')) {
        $output .= '<br>';
        $output .= t('WARNING: Organic Groups (OG) is present and may interfere
          with these settings.');

        // $output .= ' ';
        // $url = Url::fromUri('admin/config/group/settings'); // @todo D8: FIXME when OG module is ported.
        // $output .= t("In particular, if <a href=':url'>Strict node access
        //  permissions</a> is enabled, since this may override Workflow access
        //  settings.", [':url' => $url]);
        $output .= t('In particular, if <i>Strict node access permissions</i> is enabled,
           since this may override Workflow access settings.');
      }
      break;
    default:
      break;
  }
  return $output;
}