You are here

function access_field_extra_fields in Access Control Kit 7

Implements hook_field_extra_fields().

File

./access.module, line 582
The access control kit module.

Code

function access_field_extra_fields() {
  $extra = array();
  $fields = array(
    'user' => array(
      'label' => t('User'),
      'description' => t('Access control kit user reference'),
      'weight' => -5,
    ),
    'role' => array(
      'label' => t('Role'),
      'description' => t('Access control kit role reference'),
      'weight' => -4,
    ),
  );
  foreach (array_keys(access_scheme_names()) as $machine_name) {
    $extra['access_grant'][$machine_name] = array(
      'form' => $fields,
      'display' => $fields,
    );
  }
  return $extra;
}