You are here

function jammer_help in Jammer 1.0.x

Same name and namespace in other branches
  1. 5 jammer.module \jammer_help()
  2. 6 jammer.module \jammer_help()
  3. 7 jammer.module \jammer_help()

File

./jammer.module, line 109
General functions and hook implementations.

Code

function jammer_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    case 'help.page.jammer':
      $output = '';
      $output = '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('G-Jammer allows to hide/desactivate fields in forms, with various conditions.') . '</p>';
      $output .= '<h3>' . t('Usage') . '</h3>';
      $output .= '<p>' . t('See configuration page at: <a href=":structure_types">configuration page</a>', [
        ':structure_types' => Url::fromRoute('jammer.jammer_config')
          ->toString(),
      ]) . '</p>';
      $output .= '<p>' . t('Each action rule has the following elements:') . '</p>';
      $output .= '<ul>';
      $output .= '<li>' . t('Form id: drop-down to select on which form the rule will apply') . '</li>';
      $output .= '<li>' . t('Elements id: list of fields name (comma-separated) in the form on which the rule will apply') . '</li>';
      $output .= '<li>' . t('Remove/disable: if checked the target field(s) are no more visible on the form; else they are swtiched to read-only state (note: this may have no effect on some type of fields)') . '</li>';
      $output .= '<li>' . t('Always/Exclude creation/Only creation/Exclude when empty: allow to apply the rule depending of the creation status of the node (if creating a new node or modifying an existing node). Note: "Exclude when empty" is not implemented.') . '</li>';
      $output .= '<li>' . t('Only apply to role(s): list of role(s) which are concerned by the rule. The rule is applied if current user has (at least) one of these roles') . '</li>';
      $output .= '<li>' . t('Reverse role(s): negate the previous behavior. If checked the rule is applied if current user do not have any of these roles') . '</li>';
      $output .= '<li>' . t('Priority: from -20 (max priority) to 20. Rules are evaluated in this order') . '</li>';
      $output .= '<li>' . t('Category/group: string used to group together existing rules in the list at the end of the page') . '</li>';
      $output .= '<li>' . t('Comment: comment that can be associated to the rule') . '</li>';
      $output .= '</ul>';
      $output .= '<p>' . t('At bottom a table shows the existing rules. Each has a "Modify" and "Delete" link.') . '</p>';
      $output .= '<p>' . t('Do not forget to validate your modifications (button is before and after table of existing rules).') . '</p>';
      return $output;
  }
}