Created
March 5, 2014 13:58
-
-
Save LarsEliasNielsen/9367638 to your computer and use it in GitHub Desktop.
Drupal 7 Module Development: Menu to config page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_menu(). | |
* | |
* Defines paths to provide page callbacks and menu items for the site. | |
* Here it defines a configuration page with callback to a form, we'll | |
* create later on. | |
* | |
* @url: https://api.drupal.org/api/drupal/modules!system!system.api.php/function/hook_menu/7 | |
*/ | |
function espn_news_menu() { | |
$items = array(); | |
// Module configuration page. | |
$items['admin/config/content/espn_news'] = array( | |
'title' => 'ESPN News', | |
'description' => 'Configuration for ESPN News module', | |
'page callback' => 'drupal_get_form', | |
'page arguments' => array('espn_news_form'), | |
'access arguments' => array('administer site configuration'), | |
'type' => MENU_NORMAL_ITEM, | |
); | |
return $items; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment