Created
August 5, 2011 22:08
-
-
Save davereid/1128643 to your computer and use it in GitHub Desktop.
Drupal Hello World
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
name = Hello World | |
description = "The most basic exercise known to programmers, the good old Hello world." | |
core = 7.x |
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 | |
/** | |
* @file | |
* Hello world module. | |
*/ | |
/** | |
* Implements hook_menu(). | |
*/ | |
function helloworld_menu() { | |
$items['hello-world'] = array( | |
'title' => 'Hi', | |
'page callback' => 'helloworld_say_hi', | |
'access callback' => TRUE, | |
); | |
return $items; | |
} | |
/** | |
* Page callback to say hi to the world. | |
*/ | |
function helloworld_say_hi() { | |
return array('#markup' => 'Hello World'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment