function mobile_device_detection_help in Mobile Device Detection 8
Same name and namespace in other branches
- 8.3 mobile_device_detection.module \mobile_device_detection_help()
- 8.2 mobile_device_detection.module \mobile_device_detection_help()
Implements hook_help().
File
- ./
mobile_device_detection.module, line 9
Code
function mobile_device_detection_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
case 'help.page.mobile_device_detection':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('"Mobile device detection" module can detect any mobile device. You can use it via service or "Views". This module integrate with "Views" and you can easily to switch "Views display" for different devices.') . '</p>';
$output .= '<p>' . t('For more information, see the <a href="https://www.drupal.org/project/mobile_device_detection">Mobile device detection</a>.') . '</p>';
$output .= '<h3>' . t('Usage') . '</h3>';
$output .= '<p>' . t('Initialization:') . '</p>';
$output .= '<p>' . t('$entity = \\Drupal::service("object.mdd");') . '</p>';
$output .= '<hr>';
$output .= '<p>' . t('Implementation:') . '</p>';
$output .= '<p>' . t('if($entity->isMobile()) { $entity->getObject(); }') . '</p>';
$output .= '<p>' . t('if($entity->isTablet()) { $entity->getObject(); }') . '</p>';
return $output;
}
}