You are here

function heartbeat_field_extra_fields in Heartbeat 7

Implements hook_field_extra_fields().

File

./heartbeat.entity.inc, line 83

Code

function heartbeat_field_extra_fields() {
  $return = array();
  $info = entity_get_info('heartbeat_activity');
  foreach (array_keys($info['bundles']) as $bundle) {
    $return['heartbeat_activity'][$bundle] = array(
      'display' => array(
        'avatar' => array(
          'label' => 'Avatar',
          'description' => t('Heartbeat activity avatar element'),
          'weight' => 0,
        ),
        'username' => array(
          'label' => 'Username',
          'description' => t('Heartbeat activity username'),
          'weight' => 1,
        ),
        'message' => array(
          'label' => 'Message',
          'description' => t('Heartbeat activity message element'),
          'weight' => 2,
        ),
        'time' => array(
          'label' => 'Time',
          'description' => t('Heartbeat activity time element'),
          'weight' => 3,
        ),
        'buttons' => array(
          'label' => 'Buttons',
          'description' => t('Heartbeat activity buttons'),
          'weight' => 4,
        ),
      ),
    );
  }
  $return['user']['user'] = array(
    'form' => array(
      'heartbeat' => array(
        'label' => 'Heartbeat activity templates',
        'description' => t('Heartbeat activity template form element.'),
        'weight' => 6,
      ),
    ),
  );
  return $return;
}