You are here

protected function RoomsUnit::defaultLabel in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Defines the entity label if the 'entity_class_label' callback is used.

Specify 'entity_class_label' as 'label callback' in hook_entity_info() to let the entity label point to this method. Override this in order to implement a custom default label.

Overrides Entity::defaultLabel

File

modules/rooms_unit/rooms_unit.module, line 737
Manage units - Units are things that can be booked on a nightly basis (e.g. rooms - but also villas bungalows, etc).

Class

RoomsUnit
The class used for room entities

Code

protected function defaultLabel() {
  return $this->name;
}