You are here

public function Event::getEventValueField in Booking and Availability Management Tools for Drupal 8

Determines which field holds the event value

Return value

string|FALSE

1 call to Event::getEventValueField()
Event::getEventValue in modules/bat_event/src/Entity/Event.php
Returns the event value

File

modules/bat_event/src/Entity/Event.php, line 465
Contains \Drupal\bat_event\Entity\Event.

Class

Event
Defines the Event entity.

Namespace

Drupal\bat_event\Entity

Code

public function getEventValueField() {
  $type_bundle = bat_event_type_load($this
    ->bundle());
  if (isset($type_bundle->default_event_value_field_ids)) {
    return $type_bundle->default_event_value_field_ids;
  }
  if ($type_bundle
    ->getFixedEventStates() == 1) {
    return 'event_state_reference';
  }
  return FALSE;
}