function entity_legal_field_extra_fields in Entity Legal 7
Same name and namespace in other branches
- 7.2 entity_legal.module \entity_legal_field_extra_fields()
Implements hook_field_extra_fields().
File
- ./
entity_legal.module, line 407 - Entity Legal module.
Code
function entity_legal_field_extra_fields() {
// Add profile form methods to extra fields for user.
$method = new EntityLegalMethodProfileForm();
$documents = $method
->getProfileFormMethodDocuments();
$extra = array();
foreach ($documents as $document) {
$extra['user']['user']['form']['legal_' . $document
->identifier()] = array(
'label' => $document
->getVersionLabel(),
'description' => t('Checkbox for accepting !link', array(
'!link' => l($document
->label(TRUE), 'admin/structure/legal/manage/' . $document
->identifier()),
)),
'weight' => -4,
);
}
return $extra;
}