Browse Source

cleanup comments

master
ppound 4 years ago
parent
commit
a4782047d2
  1. 3
      src/Plugin/RulesAction/BatEventValidation.php

3
src/Plugin/RulesAction/BatEventValidation.php

@ -13,7 +13,7 @@ use Drupal\Core\Entity\EntityInterface;
use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\RedirectResponse;
/** /**
* Provides an action to trigger a custom publishing option. * Provides an action to Validate BAT Events using role based rules.
* *
* @RulesAction( * @RulesAction(
* id = "rules_roblib_bee_limits_validate", * id = "rules_roblib_bee_limits_validate",
@ -103,6 +103,7 @@ class BatEventValidation extends RulesActionBase {
} }
$max_bookings_allowed = $this->getMaxBookingsAllowed($user); $max_bookings_allowed = $this->getMaxBookingsAllowed($user);
if($max_bookings_allowed != -1 && $active_bookings >= $max_bookings_allowed){ if($max_bookings_allowed != -1 && $active_bookings >= $max_bookings_allowed){
// TODO: don't use depracated function
drupal_set_message(t('Rule Hit Reservation exceeded your maximum number drupal_set_message(t('Rule Hit Reservation exceeded your maximum number
of active bookings allowed. You currently have @active_bookings active reservations, of active bookings allowed. You currently have @active_bookings active reservations,
You are allowed @max_bookings .', array('@active_bookings' => $active_bookings, You are allowed @max_bookings .', array('@active_bookings' => $active_bookings,

Loading…
Cancel
Save