class GroupExtraFieldsController in Group 7
Controller for generating extra fields for groups and group entities.
Hierarchy
- class \EntityDefaultExtraFieldsController implements EntityExtraFieldsControllerInterface
- class \GroupExtraFieldsController
Expanded class hierarchy of GroupExtraFieldsController
1 string reference to 'GroupExtraFieldsController'
- group_entity_info in ./
group.entity.inc - Implements hook_entity_info().
File
- classes/
group.extra_fields_controller.inc, line 10 - Defines the Entity API extra fields class for groups.
View source
class GroupExtraFieldsController extends EntityDefaultExtraFieldsController {
/**
* Implements EntityExtraFieldsControllerInterface::fieldExtraFields().
*/
public function fieldExtraFields() {
$extra = array();
foreach (group_types() as $type => $group_type) {
// Add the 'title' form field to every group type.
$extra['group'][$type]['form']['title'] = array(
'label' => t('Group title'),
'description' => t('The name of the group'),
'weight' => -5,
);
// Add the membership action form.
$extra['group'][$type]['display']['membership_actions'] = array(
'label' => t('Membership action form'),
'description' => t('The form containing various membership actions such as: join, leave, request membership, ...'),
'weight' => -4,
);
// Add Path module support.
if (module_exists('path')) {
$extra['group'][$type]['form']['path'] = array(
'label' => t('URL path settings'),
'description' => t('Path module form elements'),
'weight' => 99,
);
}
}
return $extra;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityDefaultExtraFieldsController:: |
protected | property | ||
EntityDefaultExtraFieldsController:: |
protected | property | ||
EntityDefaultExtraFieldsController:: |
protected | function | Generates the display field info for a given property. | |
EntityDefaultExtraFieldsController:: |
public | function | Constructor. | |
GroupExtraFieldsController:: |
public | function |
Implements EntityExtraFieldsControllerInterface::fieldExtraFields(). Overrides EntityDefaultExtraFieldsController:: |