function availability_calendar_entity_property_info in Availability Calendars 7.5
Implements hook_entity_property_info().
Defines the labels and types of the properties of the 'availability_calendar_calendar' entity.
File
- ./
availability_calendar.entity.inc, line 74 - Contains Entity API and Search API hooks and callbacks.
Code
function availability_calendar_entity_property_info() {
$return = array(
'availability_calendar_calendar' => array(
'properties' => array(
// Schema fields. We override to define the correct type and textual
// information.
'cid' => array(
'label' => t('Calendar ID'),
'description' => t('The unique ID of the calendar.'),
'type' => 'integer',
'schema field' => 'cid',
),
'created' => array(
'label' => t('Created date'),
'description' => t('The date the calendar was created.'),
'type' => 'date',
'schema field' => 'created',
),
'changed' => array(
'label' => t('Last updated date'),
'description' => t('The date the calendar was last updated.'),
'type' => 'date',
'schema field' => 'changed',
),
// Virtual, non stored properties.
// Filtered availability: should only be used in Search API indices.
'filtered_availability' => array(
'label' => t('Filtered availability'),
'description' => t('Availability for this calendar, filtered for search optimization.'),
'type' => 'list<date>',
'getter callback' => 'availability_calendar_calendar_entity_property_filtered_availability_get',
),
),
),
);
return $return;
}