You are here

function merci_reservation_entity_property_info in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.3

Implements hook_entity_property_info().

File

merci_reservation/merci_reservation.module, line 195

Code

function merci_reservation_entity_property_info() {
  $info = array();

  // Add meta-data about the basic commerce_line_item properties.
  $properties =& $info['merci_reservation']['properties'];
  $properties['id'] = array(
    'label' => t('Merci Reservation ID'),
    'description' => t('The internal numeric ID of the merci reservation.'),
    'type' => 'integer',
    'schema field' => 'id',
  );
  $properties['type'] = array(
    'label' => t('Type'),
    'description' => t('The human readable name of the merci reservation type.'),
    'type' => 'token',
    'setter callback' => 'entity_property_verbatim_set',
    'options list' => 'merci_reservation_type_options_list',
    'required' => TRUE,
    'schema field' => 'type',
  );
  $properties['created'] = array(
    'label' => t('Date created'),
    'description' => t('The date the merci reservation was created.'),
    'type' => 'date',
    'setter callback' => 'entity_metadata_verbatim_set',
    'setter permission' => 'create merci reservation',
    'schema field' => 'created',
  );
  $properties['changed'] = array(
    'label' => t('Date changed'),
    'description' => t('The date the merci reservation was most recently updated.'),
    'type' => 'date',
    'schema field' => 'changed',
  );
  $properties['owner'] = array(
    'label' => t('Owner'),
    'description' => t('The owner of the reservation.'),
    'type' => 'user',
    'schema field' => 'uid',
  );
  return $info;
}