function hds_ds_fields in Heartbeat 6.4
Implementation of hook_ds_fields().
File
- modules/
hds/ hds.module, line 141 - Heartbeat displays module.
Code
function hds_ds_fields($type_name, $build_mode, $extra) {
$fields = array(
'ds_avatar' => array(
'title' => 'Actor avatar',
'properties' => array(
'formatters' => array(
'ds_eval_code' => t('Default'),
),
'code' => '<?php print theme("user_picture", $object->actor); ?>',
),
'type' => DS_FIELD_TYPE_CODE,
'status' => DS_FIELD_STATUS_STATIC,
),
'ds_message' => array(
'title' => 'Message',
'properties' => array(
'formatters' => array(
'ds_eval_code' => t('Default'),
),
'code' => '<?php print $object->message; ?>',
),
'type' => DS_FIELD_TYPE_CODE,
'status' => DS_FIELD_STATUS_STATIC,
),
'ds_created' => array(
'title' => 'Created time',
'properties' => array(
'formatters' => array(
'hds_created_time_ago' => t('Time ago'),
'hds_created_time_interval' => t('Time interval, granularity 2'),
'hds_created_time_small' => t('Date format small'),
'hds_created_time_medium' => t('Date format medium'),
'hds_created_time_large' => t('Date format large'),
),
),
'type' => DS_FIELD_TYPE_THEME,
'status' => DS_FIELD_STATUS_STATIC,
),
'ds_widgets' => array(
'title' => 'Widget attachments',
'properties' => array(
'formatters' => array(
'ds_eval_code' => t('Default'),
),
'code' => '<?php print _theme_heartbeat_widgets($object); ?>',
),
'type' => DS_FIELD_TYPE_CODE,
'status' => DS_FIELD_STATUS_STATIC,
),
'ds_buttons' => array(
'title' => 'Buttons',
'properties' => array(
'formatters' => array(
'ds_eval_code' => t('Default'),
),
'code' => '<?php print theme("heartbeat_buttons", $object); ?>',
),
'type' => DS_FIELD_TYPE_CODE,
'status' => DS_FIELD_STATUS_STATIC,
),
);
return array(
'hds' => $fields,
);
}