PHP Classes

File: nbg_currency.module

Recommend this page to a friend!
  Classes of Temuri Takalandze   Drupal NBG Currency   nbg_currency.module   Download  
File: nbg_currency.module
Role: Example script
Content type: text/plain
Description: Example script
Class: Drupal NBG Currency
Drupal module to show currency values with NBG API
Author: By
Last change:
Date: 4 years ago
Size: 841 bytes
 

Contents

Class file image Download
<?php

/**
 * @file
 * Contains nbg_currency.module.
 */

use Drupal\Core\Routing\RouteMatchInterface;

/**
 * Implements hook_help().
 */
function nbg_currency_help($route_name, RouteMatchInterface $route_match) {
  switch (
$route_name) {
   
// Main module help for the nbg_currency module.
   
case 'help.page.nbg_currency':
     
$output = '';
     
$output .= '<h3>' . t('About') . '</h3>';
     
$output .= '<p>' . t('Module for working with NBG Currency API.') . '</p>';
      return
$output;

    default:
  }
}

/**
 * Implements hook_theme().
 */
function nbg_currency_theme() {
  return [
   
'nbg_currency' => [
     
'render element' => 'children',
     
'variables' => [
       
'currency_data' => NULL,
       
'module_path' => \Drupal::moduleHandler()
          ->
getModule('nbg_currency')->getPath(),
      ],
    ],
  ];
}