Exemplo n.º 1
0
 function hasOpenTimeslots($user = null)
 {
     $userCondition = '';
     if ($user) {
         $userCondition = ' AND `contact_id` = ' . $user->getId();
     }
     return Timeslots::findOne(array('conditions' => array('`rel_object_id` = ? AND end_time = \'' . EMPTY_DATETIME . '\'' . $userCondition, $this->getObjectId()))) instanceof Timeslot;
 }
 function hasOpenTimeslots($user = null)
 {
     $userCondition = '';
     if ($user) {
         $userCondition = ' and `user_id` = ' . $user->getId();
     }
     return Timeslots::findOne(array('conditions' => array('`object_id` = ? AND `object_manager` = ? AND end_time = \'' . EMPTY_DATETIME . '\'' . $userCondition, $this->getObjectId(), get_class($this->manager())))) instanceof Timeslot;
 }