Created
December 6, 2012 09:30
-
-
Save drupalista-br/4223234 to your computer and use it in GitHub Desktop.
Drupal 7 Profile2 Custom User Tab Form ( MYMODULE.module )
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(). | |
*/ | |
function MYMODULE_menu() { | |
// MYCUSTOMPATH can't be the world 'profile' | |
$items['user/%user/MYCUSTOMPATH'] = array( | |
'title' => 'Profile', | |
'description' => 'User Profile2', | |
'page callback' => 'drupal_get_form', | |
'page arguments' => array('MYMODULE_load_profile2_MYPROFILE2TYPE_form', 1), | |
'access callback' => TRUE, | |
'access arguments' => array(1), | |
'type' => MENU_LOCAL_TASK, | |
'file' => 'MYMODULE_profile2_MYPROFILE2TYPE.inc', | |
); | |
return $items; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment