You are here

function party_activity_field_extra_fields in Party 7

Implements hook_field_extra_fields().

File

modules/party_activity/party_activity.module, line 88
Functions and important hooks for the party_activity module

Code

function party_activity_field_extra_fields() {
  $extra = array();
  $types = db_select('party_activity_type', 'at')
    ->fields('at', array(
    'type',
    'label',
  ))
    ->execute()
    ->fetchAllKeyed();
  foreach ($types as $type => $label) {
    $extra['party_activity'][$type] = array(
      'form' => array(
        'title' => array(
          'label' => t('Title'),
          'description' => '',
          'weight' => -5,
        ),
      ),
    );
  }
  return $extra;
}