You are here

drupalgap.module in DrupalGap 8.0.x

File

drupalgap.module
View source
<?php

use Drupal\Core\Routing\RouteMatchInterface;

/**
 * Implements hook_help().
 */
function drupalgap_help($route_name, RouteMatchInterface $route_match) {
  switch ($route_name) {

    // Main module help for the jdrupal module.
    case 'help.page.drupalgap':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<p>' . t('The DrupalGap module for Drupal 8.') . '</p>';
      return $output;
    default:
  }
}

/**
 * Implements hook_permission().
 */

//function drupalgap_permission() {

//  return array(
//    'administer drupalgap' => array(
//      'title' => 'Administer DrupalGap'
//    )
//  );

//}

/**
* Implements hook_menu().
*/
function drupalgap_menu() {
  $items['admin/config/services/drupalgap'] = array(
    'title' => 'DrupalGap',
    'description' => 'The DrupalGap configuration page.',
    'route_name' => 'drupalgap.drupalgap_config',
  );
  return $items;
}

/**
 * Implements hook_jdrupal_connect_alter().
 */
function drupalgap_jdrupal_connect_alter(&$results) {

  // Add some custom data to the result.
  $results['my_module'] = array(
    'hello' => 'world',
    'foo' => array(
      'bar',
      'chew',
    ),
    'remote_addr' => $_SERVER['REMOTE_ADDR'],
  );
}

Functions

Namesort descending Description
drupalgap_help Implements hook_help().
drupalgap_jdrupal_connect_alter Implements hook_jdrupal_connect_alter().
drupalgap_menu Implements hook_menu().