test.module in Coder 8.3
File
tests/DrupalPractice/FunctionDefinitions/test.module
View source
<?php
function test_init() {
drupal_add_css('somefile.css');
}
function test_page_build($page) {
drupal_add_css('somefile.css');
}
function test_menu() {
$items['admin/secret/stuff'] = array(
'title' => 'Secret stuff',
'page callback' => 'test_page_callback',
'access callback' => TRUE,
'type' => MENU_CALLBACK,
);
return $items;
}
function test_form_node_form_alter(&$form, &$form_state, $form_id) {
$enabled_menus = variable_get('menu_options_' . $form['#node']->type, array(
'main-menu',
));
if (empty($enabled_menus)) {
return;
}
}