function party_user_party_data_set_info in Party 7
Same name and namespace in other branches
- 8.2 modules/party_user/party_user.module \party_user_party_data_set_info()
Implements hook_party_data_set_info()
File
- modules/
party_user/ party_user.party_info.inc, line 10 - Party info hook include.
Code
function party_user_party_data_set_info() {
$sets['user'] = array(
'label' => t("User account"),
'entity type' => 'user',
'class' => 'PartyUserDataSet',
'singleton' => TRUE,
'max cardinality' => 1,
'admin' => array(
'edit' => 'admin/config/people/accounts',
'manage fields' => 'admin/config/people/accounts/fields',
'manage display' => 'admin/config/people/accounts/display',
),
'form callback' => 'party_user_form_user',
// Provide a piece corresponding to the data set.
'piece' => array(
'path' => 'user',
'maker' => 'core',
// @todo: these don't have any effect yet.
// @see http://drupal.org/node/1669774.
'weight' => -8,
),
'actions' => array(
'attach' => array(
'controller' => 'PartyUserDataSetUIAttach',
'action label' => 'Attach existing user',
),
'add' => array(
'controller' => 'PartyUserDataSetUIAdd',
'action label' => 'Add a new user',
),
),
// Some of our permissions require a warning.
'permissions' => array(
// Attaching a user account to a party potentially grants a new user
// access to data on that party.
'attach' => array(
'restrict access' => TRUE,
),
'edit' => array(
'restrict access' => TRUE,
),
),
);
return $sets;
}