You are here

public function BatEvent::getEventValueField in Booking and Availability Management Tools for Drupal 7

Determines which field holds the event value.

Return value

string|false

1 call to BatEvent::getEventValueField()
BatEvent::getEventValue in modules/bat_event/bat_event.module
Returns the value stored for this event in a way that BAT can work with it.

File

modules/bat_event/bat_event.module, line 1180
Manage Events - Events store the EventValue of a Unit over a period of time.

Class

BatEvent
The class used for Event entities.

Code

public function getEventValueField() {
  $type_bundle = bat_event_type_load($this->type);
  if (isset($type_bundle->default_event_value_field_ids[$this->type])) {
    return $type_bundle->default_event_value_field_ids[$this->type];
  }
  if ($type_bundle->fixed_event_states == 1) {
    return 'event_state_reference';
  }
  return FALSE;
}