function context_help in Context 8
Same name and namespace in other branches
- 8.4 context.module \context_help()
- 6.3 context.core.inc \context_help()
- 7.3 context.core.inc \context_help()
Implements hook_help().
File
- ./
context.module, line 9
Code
function context_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.context':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('The Context module lets users define conditions for when certain reactions should take place.') . '</p>';
$output .= '<p>' . t('An example of a condition could be when viewing a certain node type and blocks should be placed as a reaction when viewing a page with this node type.') . '</p>';
$output .= '<h3>' . t('Uses') . '</h3>';
$output .= '<dl>';
$output .= '<dt>' . t('Managing context') . '</dt>';
$output .= '<dd>' . t('Users with <em>Administer contexts</em> permission can add contextual conditions and reactions for different portions of their site. For each context, they can choose the conditions that trigger this context to be active and choose different aspects of their site that should react to this active context.') . '</dd>';
$output .= '<dt>' . t('Adding new custom reactions') . '</dt>';
$output .= '<dd>' . t('Reactions for the context module are defined trough the new <a href=":link">Drupal 8 Plugin API</a>.', array(
':link' => 'https://www.drupal.org/developing/api/8/plugins',
)) . '</dd>';
$output .= '<dd>' . t('The Context module defines a plugin type named ContextReaction that users can extend when creating their own plugins.') . '</dd>';
$output .= '<dd>' . t('A context reaction requires a configuration form and execute method. The execution of the plugin is also something that will have to be handled by the author of the reaction.') . '</dd>';
$output .= '</dl>';
return $output;
}
}