1 file_example.module | file_example_menu() |
Implements hook_menu().
Set up the URLs (menu entries) for the file examples.
Related topics
File
- modules/
examples/ file_example/ file_example.module, line 27 - Hook implementations for the File Example module.
Code
function file_example_menu() {
$items = array();
$items['examples/file_example'] = array(
'title' => 'File Example',
'page callback' => 'file_example_intro',
'access callback' => TRUE,
'expanded' => TRUE,
);
$items['examples/file_example/fileapi'] = array(
'title' => 'Use File API to read/write a file',
'page callback' => 'backdrop_get_form',
'access arguments' => array('use file example'),
'page arguments' => array('file_example_readwrite'),
);
$items['examples/file_example/access_session'] = array(
'page callback' => 'file_example_session_contents',
'access arguments' => array('use file example'),
'type' => MENU_CALLBACK,
);
return $items;
}