You are here

function social_tagging_help in Open Social 8.4

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_tagging/social_tagging.module \social_tagging_help()
  2. 8 modules/social_features/social_tagging/social_tagging.module \social_tagging_help()
  3. 8.2 modules/social_features/social_tagging/social_tagging.module \social_tagging_help()
  4. 8.3 modules/social_features/social_tagging/social_tagging.module \social_tagging_help()
  5. 8.5 modules/social_features/social_tagging/social_tagging.module \social_tagging_help()
  6. 8.6 modules/social_features/social_tagging/social_tagging.module \social_tagging_help()
  7. 8.7 modules/social_features/social_tagging/social_tagging.module \social_tagging_help()
  8. 8.8 modules/social_features/social_tagging/social_tagging.module \social_tagging_help()
  9. 10.3.x modules/social_features/social_tagging/social_tagging.module \social_tagging_help()
  10. 10.0.x modules/social_features/social_tagging/social_tagging.module \social_tagging_help()
  11. 10.1.x modules/social_features/social_tagging/social_tagging.module \social_tagging_help()
  12. 10.2.x modules/social_features/social_tagging/social_tagging.module \social_tagging_help()

Implements hook_help().

File

modules/social_features/social_tagging/social_tagging.module, line 22
Contains social_tagging.module.

Code

function social_tagging_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {

    // Main module help for the social_tagging module.
    case 'help.page.social_tagging':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('Content tagging module') . '</p>';
      return $output;
    case 'entity.taxonomy_vocabulary.overview_form':
      $tag_service = Drupal::getContainer()
        ->get('social_tagging.tag_service');
      if ($tag_service
        ->allowSplit()) {

        /* @var \Drupal\taxonomy\Entity\Vocabulary $vocabulary */
        $vocabulary = $route_match
          ->getParameter('taxonomy_vocabulary');
        if ($vocabulary
          ->id() === 'social_tagging' && $tag_service
          ->allowSplit()) {
          return '<p><strong>' . t('Notice: Drag and drop has intentionally been disabled for this vocabulary.') . '</strong></p>';
        }
      }
  }
}