You are here

test.module in Coder 8.2

File

coder_sniffer/DrupalPractice/Test/FunctionDefinitions/test.module
View source
<?php

/**
 * Implements hook_init().
 */
function test_init() {
  drupal_add_css('somefile.css');
}

/**
 * Implements hook_page_build().
 */
function test_page_build($page) {
  drupal_add_css('somefile.css');
}

/**
 * Implements hook_menu().
 */
function test_menu() {
  $items['admin/secret/stuff'] = array(
    'title' => 'Secret stuff',
    'page callback' => 'test_page_callback',
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  return $items;
}

/**
 * Implements hook_form_alter().
 */
function test_form_node_form_alter(&$form, &$form_state, $form_id) {
  $enabled_menus = variable_get('menu_options_' . $form['#node']->type, array(
    'main-menu',
  ));

  // Skip if there's no enabled menus available.
  if (empty($enabled_menus)) {
    return;
  }
}

Functions

Namesort descending Description
test_form_node_form_alter Implements hook_form_alter().
test_init Implements hook_init().
test_menu Implements hook_menu().
test_page_build Implements hook_page_build().