function hasService(SLN_Wrapper_Service $service) { return in_array($service->getId(), $this->getServicesIds()); }
public function removeService(SLN_Wrapper_Service $service) { $k = array_search($service->getId(), $this->data['services']); if ($k !== false) { unset($this->data['services'][$k]); } }
public function validateService(SLN_Wrapper_Service $service) { if ($service->isNotAvailableOnDate($this->date)) { return array(__('This service is unavailable ', 'sln') . $service->getNotAvailableString()); } $ids = $this->getDayBookings()->countServicesByHour(); if ($service->getUnitPerHour() > 0 && isset($ids[$service->getId()]) && $ids[$service->getId()] >= $service->getUnitPerHour()) { return array(__('The service for this hour is currently full', 'sln') . $service->getNotAvailableString()); } }