function hook_party_party_piece_info in Party 7
Same name and namespace in other branches
- 8.2 party.api.php \hook_party_party_piece_info()
Defines party pieces, that is, components of the party display.
Return value
An array of display pieces (similar to hook_menu) where each key is the path component beneath the 'party/%' path. In addition to normal hook_menu() items, each array may also have the following properties:
- 'label': The human readable name of the party piece.
- 'page callback': The name of the display function. This should return a renderable array.
- 'page arguments': Any extra arguments to supply to the page callback.
- 'data set': (optional) The data set this is associated with. (If this is set, edit and add links will appear around the piece linking to the forms laid out in data_set_info);
- 'nesting': True if the party piece can have children.
File
- ./
party.api.php, line 173 - Hooks provided by the Party module.
Code
function hook_party_party_piece_info() {
$pieces = array();
$pieces['user_username'] = array(
'label' => "Username only",
'page callback' => "party_user_display_user",
'page arguments' => array(
'username',
),
'data set' => 'user',
);
$pieces['user_fullaccount'] = array(
'label' => "Username only",
'display callback' => "party_user_display_user",
'display arguments' => array(
'full account',
),
'data set' => 'user',
);
return $pieces;
}