You are here

bad.module in Coder 8.3.x

Same filename and directory in other branches
  1. 8.3 tests/Drupal/bad/bad.module

Bad examples of install hooks in a module file.

File

tests/Drupal/bad/bad.module
View source
<?php

/**
 * @file
 * Bad examples of install hooks in a module file.
 */
define('UNPREFIXED_CONSTANT', 'invalid');

/**
 * Implements hook_install().
 */
function bad_install() {
  return TRUE;
}

/**
 * Implements hook_uninstall().
 */
function bad_uninstall() {
  return TRUE;
}

/**
 * Implements hook_install().
 */
function bad_schema() {
  return TRUE;
}

/**
 * Implements hook_install().
 */
function bad_requirements() {
  return TRUE;
}

/**
 * Implements hook_menu().
 *
 * Menu title and description should be untranslated.
 */
function bad_menu() {
  $items['example'] = array(
    'title' => t('Example Page'),
    'description' => t('My example module page that does something.'),
    'page callback' => 'example_page',
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_SUGGESTED_ITEM,
  );
  return $items;
}

Functions

Namesort descending Description
bad_install Implements hook_install().
bad_menu Implements hook_menu().
bad_requirements Implements hook_install().
bad_schema Implements hook_install().
bad_uninstall Implements hook_uninstall().

Constants

Namesort descending Description
UNPREFIXED_CONSTANT @file Bad examples of install hooks in a module file.