public function ReservationConflicts::getTotalBucketsFilled in MERCI (Manage Equipment Reservations, Checkout and Inventory) 8.2
1 call to ReservationConflicts::getTotalBucketsFilled()
File
- src/
ReservationConflicts.php, line 253 - 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 getTotalBucketsFilled($delta = NULL, $dates = NULL) {
$this
->validate();
$total_buckets_filled = $this->total_buckets_filled;
if ($delta === NULL) {
return $total_buckets_filled;
}
if (empty($dates)) {
return array_key_exists($delta, $total_buckets_filled) ? $total_buckets_filled[$delta] : 0;
}
$date_value = $dates
->get('value')
->getValue();
return (array_key_exists($delta, $total_buckets_filled) and array_key_exists($date_value, $total_buckets_filled[$delta])) ? $total_buckets_filled[$delta][$date_value] : 0;
}