You are here

function office_hours_property_info_callback in Office Hours 7

1 string reference to 'office_hours_property_info_callback'
office_hours_field_info in includes/office_hours.field.inc
Implements hook_field_info().

File

includes/office_hours.field.inc, line 39
Implements the office_hours Field.

Code

function office_hours_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']['day'] = array(
    'type' => 'integer',
    'label' => t('Day'),
    'description' => "Stores the day of the week's numeric representation (0-6)",
    'setter callback' => 'entity_property_verbatim_set',
    'default' => 0,
  );
  $property['property info']['starthours'] = array(
    'type' => 'integer',
    'label' => t('Start Hours'),
    'description' => 'Stores the start hours value',
    'setter callback' => 'entity_property_verbatim_set',
    'default' => 0,
  );
  $property['property info']['endhours'] = array(
    'type' => 'integer',
    'label' => t('End Hours'),
    'description' => 'Stores the end hours value',
    'setter callback' => 'entity_property_verbatim_set',
    'default' => 0,
  );
  $property['property info']['comment'] = array(
    'type' => 'varchar',
    'label' => t('Comment'),
    'description' => 'Stores the comment',
    'setter callback' => 'entity_property_verbatim_set',
    'default' => 0,
  );
}