function workflow_help in Workflow 8
Same name and namespace in other branches
- 5.2 workflow.module \workflow_help()
- 5 workflow.module \workflow_help()
- 7.2 workflow.module \workflow_help()
@inheritdoc
File
- ./
workflow.module, line 49 - Support workflows made up of arbitrary states.
Code
function workflow_help($route_name) {
$output = '';
switch ($route_name) {
case 'help.page.workflow':
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Workflow module adds a field to Entities to
store field values as Workflow states. You can control "state transitions"
and add action to specific transitions.') . '</p>';
return $output;
case 'entity.workflow_transition.field_ui_fields':
return t('This page allows you to add fields to the Workflow form.
Normally this is an advanced action, which is not needed in
regular use cases.');
case 'entity.workflow_type.collection':
return t('This page allows you to maintain Workflows. Once a workflow is
created, you can maintain your entity type and add a Field of type
\'Workflow\'.');
case 'entity.workflow_state.collection':
return t("To create a new state, enter its name in the last row of the\n 'State' column. Check the 'Active' box to make it effective. You may\n also drag it to the appropriate position.") . '<br />' . t("A state must be marked as active, to be available in the\n workflow's transitions.") . '<br />' . t("If you wish to inactivate a state that has content (i.e. count is\n not zero), then you need to select a state to which to reassign that\n content.");
case 'entity.workflow_transition.collection':
$url = Url::fromRoute('user.admin_permissions', [], [
'fragment' => 'module-workflow',
]);
return t('You are currently viewing the possible transitions to and from
workflow states. The state is shown in the left column; the state to be
moved to is to the right. For each transition, check the box next to
the role(s) that may initiate the transition. For example, if only the
"production editor" role may move content from Review state to the
Published state, check the box next to "production editor". The author
role is built in and refers to the user who authored the content.') . '<br /><i>' . t("If not all roles are in the list, please review which roles may\n 'participate in workflows' on <a href=':url'>the Permissions page</a>.\n On that page, uncheck the 'Authenticated user' role temporarily to\n view the permissions of each separate role.</i>", [
':url' => $url
->toString(),
]);
case 'entity.workflow_transition_label.collection':
return t('You can add labels to transitions if you don\'t like the
standard state labels. They will modify the Workflow form options, so
specific workflow transitions can have their own labels, relative to
the beginning and ending states. Rather than showing the user a
workflow box containing options like "review required" as a state in
the workflow, it could say "move to the editing department for grammar
review".');
}
return $output;
}