public function ReservationConflicts::getConflicts in MERCI (Manage Equipment Reservations, Checkout and Inventory) 8.2
Overrides ReservationConflictsInterface::getConflicts
1 call to ReservationConflicts::getConflicts()
File
- src/
ReservationConflicts.php, line 234 - Contains \Drupal\merci\ReservationConflicts. Abstraction of the selection logic of an entity reference field.
Class
- ReservationConflicts
- A null implementation of EntityReference_SelectionHandler.
Namespace
Drupal\merciCode
public function getConflicts($delta = NULL, $dates = NULL) {
$this
->validate();
$conflicts = $this->conflicting_entities;
if ($delta === NULL) {
return $conflicts;
}
if (empty($dates)) {
return array_key_exists($delta, $conflicts) ? $conflicts[$delta] : FALSE;
}
$date_value = $dates
->get('value')
->getValue();
return (array_key_exists($delta, $conflicts) and array_key_exists($date_value, $conflicts[$delta])) ? $conflicts[$delta][$date_value] : FALSE;
}