module_filter.module in Module Filter 6
Same filename and directory in other branches
This is the file description for Module Filter module.
In this more verbose, multi-line description, you can specify what this file does exactly. Make sure to wrap your documentation in column 78 so that the file can be displayed nicely in default-sized consoles.
@author greenSkin
File
module_filter.moduleView source
<?php
/**
* @file
* This is the file description for Module Filter module.
*
* In this more verbose, multi-line description, you can specify what this
* file does exactly. Make sure to wrap your documentation in column 78 so
* that the file can be displayed nicely in default-sized consoles.
*
* @author greenSkin
*/
/**
* Implementation of hook_perm().
*/
function module_filter_perm() {
return array(
'administer module filter',
);
}
/**
* Implementation of hook_menu().
*/
function module_filter_menu() {
$items['admin/settings/module_filter'] = array(
'title' => 'Module filter',
'description' => 'Configure settings for Module Filter.',
'access arguments' => array(
'administer module filter',
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'module_filter_settings',
),
'file' => 'module_filter.admin.inc',
);
return $items;
}
/**
* Implementation of hook_form_FORM_ID_alter().
*/
function module_filter_form_system_modules_alter(&$form, $form_state) {
// Don't alter the form when confirming.
if (isset($form['confirm'])) {
return;
}
$form['module_filter'] = array(
'#tree' => TRUE,
);
$form['module_filter']['name'] = array(
'#type' => 'textfield',
'#title' => t('Filter list'),
);
$form['module_filter']['show'] = array(
'#type' => 'checkboxes',
'#default_value' => array(
'enabled',
'disabled',
'required',
'unavailable',
),
'#options' => array(
'enabled' => t('Enabled'),
'disabled' => t('Disabled'),
'required' => t('Required'),
'unavailable' => t('Unavailable'),
),
'#prefix' => '<div id="module-filter-show-wrapper">',
'#suffix' => '</div>',
);
$form['#theme'] = 'module_filter_system_modules';
}
/**
* Implementation of hook_theme().
*/
function module_filter_theme() {
return array(
'module_filter_system_modules' => array(
'arguments' => array(
'form' => NULL,
),
'file' => 'module_filter.theme.inc',
),
'module_filter_system_modules_tabs' => array(
'arguments' => array(
'form' => NULL,
),
'file' => 'module_filter.theme.inc',
),
);
}
Functions
Name | Description |
---|---|
module_filter_form_system_modules_alter | Implementation of hook_form_FORM_ID_alter(). |
module_filter_menu | Implementation of hook_menu(). |
module_filter_perm | Implementation of hook_perm(). |
module_filter_theme | Implementation of hook_theme(). |