visualn-8.x-1.x-dev/modules/visualn_basic_drawers/visualn_basic_drawers.module

modules/visualn_basic_drawers/visualn_basic_drawers.module
<?php

/**
 * @file
 * Contains visualn_basic_drawers.module.
 */

use Drupal\Core\Routing\RouteMatchInterface;

/**
 * Implements hook_help().
 */
function visualn_basic_drawers_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {
    // Main module help for the visualn_basic_drawers module.
    case 'help.page.visualn_basic_drawers':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('Contains basic drawers with compatible data generators') . '</p>';
      return $output;

    default:
  }
}

/**
 * Implements hook_theme().
 */
function visualn_basic_drawers_theme($existing, $type, $theme, $path) {

  return [
    'visualn_newsfeed_html_basic_drawer' => [
      'variables' => [
        'header_title' => '',
        'data' => [],
      ],
      'template' => 'drawers/newsfeed-html-basic',
    ],
  ];
}

// @todo: impelment hook_requirements() and check for required libraries though
//   should be compatible with overrides i.e. should get library assets info (if
//   any) and check if dowloaded, also see jquery_colorpicker module for example

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc