You are here

function birthdays_field_item_property_info_callback in Birthdays 7

Defines info for the properties of the link-field item data structure.

1 string reference to 'birthdays_field_item_property_info_callback'
birthdays_field_info in ./birthdays.module
Implements hook_field_info().

File

./birthdays.module, line 1173
The Birthdays module allows users to add their birthday to their profile. It lists birthdays on a seperate page and in different blocks. Users can receive an email on their birthday automatically, and the administrator can receive daily reminders of…

Code

function birthdays_field_item_property_info_callback(&$info, $entity_type, $field, $instance, $field_type) {
  $property =& $info[$entity_type]['bundles'][$instance['bundle']]['properties'][$field['field_name']];
  $property['getter callback'] = 'entity_metadata_field_verbatim_get';
  $property['setter callback'] = 'entity_metadata_field_verbatim_set';
  unset($property['query callback']);
  $property['property info']['year'] = array(
    'type' => 'integer',
    'label' => t('Year'),
    'setter callback' => 'entity_property_verbatim_set',
  );
  $property['property info']['month'] = array(
    'type' => 'integer',
    'label' => t('Month'),
    'setter callback' => 'entity_property_verbatim_set',
  );
  $property['property info']['day'] = array(
    'type' => 'integer',
    'label' => t('Day'),
    'setter callback' => 'entity_property_verbatim_set',
  );
  $property['property info']['triggers'] = array(
    'type' => 'integer',
    'label' => t('Triggers'),
    'setter callback' => 'entity_property_verbatim_set',
  );
}