Slide 21
Slide 21 text
/**
* Implements hook_entity_info().
*/
function gc_reservation_entity_info() {
return array(
'gc_reservation' => array(
'label' => t('Reservation'),
'plural label' => t('Reservations'),
'entity class' => 'GCReservation',
'controller class' => 'GCReservationController',
'base table' => 'gc_reservation',
'entity cache' => TRUE,
'entity keys' => array(
'id' => 'id',
'label' => 'id',
),
'label callback' => 'entity_class_label',
'uri callback' => 'gc_reservation_reservation_uri',
'fieldable' => TRUE,
'bundles' => array(
'gc_reservation' => array(
'label' => t('Reservation'),
'admin' => array(
'path' => 'admin/structure/reservations',
'access arguments' => array('administer reservation settings'),
),
),
),
'access callback' => 'gc_reservation_reservation_access',
'module' => 'gc_reservation',
'admin ui' => array(
'path' => 'admin/content/reservations',
'file' => 'gc_reservation.admin.inc',
'controller class' => 'GCReservationUIController',
),
),
);
}