|
|
|
@ -28,7 +28,7 @@ function reserve_categories($ebundle = null) {
|
|
|
|
|
else { |
|
|
|
|
$query = \Drupal::service('entity_type.manager') |
|
|
|
|
->getStorage('reserve_category')->getQuery(); |
|
|
|
|
$ids = $query->condition('status', TRUE)->execute(); |
|
|
|
|
$ids = $query->condition('status', TRUE)->accessCheck(FALSE)->execute(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$cats = \Drupal::entityTypeManager()->getStorage('reserve_category')->loadMultiple($ids); |
|
|
|
@ -67,7 +67,7 @@ function reserve_entities($ebundle) {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//->sort('reservations_display_order', 'ASC') |
|
|
|
|
$ids = $query->execute(); |
|
|
|
|
$ids = $query->accessCheck(FALSE)->execute(); |
|
|
|
|
|
|
|
|
|
$entities = \Drupal::entityTypeManager()->getStorage($entity_type)->loadMultiple($ids); |
|
|
|
|
|
|
|
|
@ -933,6 +933,7 @@ function reserve_daily_max_exceeded($yyyy_mmdd) {
|
|
|
|
|
if ($user->id()) { |
|
|
|
|
$ids = \Drupal::service('entity_type.manager') |
|
|
|
|
->getStorage('reserve_reservation')->getQuery() |
|
|
|
|
->accessCheck(FALSE) |
|
|
|
|
->condition('user_id', $user->id()) |
|
|
|
|
->condition('reservation_date', $yyyy_mmdd . '%', 'like') |
|
|
|
|
->execute(); |
|
|
|
@ -966,6 +967,7 @@ function reserve_user_reservations() {
|
|
|
|
|
$latest_date = date('Y-m-d', strtotime("now +13 days")); |
|
|
|
|
$ids = \Drupal::service('entity_type.manager') |
|
|
|
|
->getStorage('reserve_reservation')->getQuery() |
|
|
|
|
->accessCheck(TRUE) |
|
|
|
|
->condition('user_id', $user->id()) |
|
|
|
|
->condition('reservation_date', $earliest_date, '>=') |
|
|
|
|
->condition('reservation_date', $latest_date, '<=') |
|
|
|
|