Example #1
0
 public function getDaytimesByService($calendar_id, $service_id)
 {
     $modeldaytime = new estivolemodeldaytime();
     $this->daytimes = $modeldaytime->listitems();
     echo json_encode($this->daytimes);
     exit;
 }
Example #2
0
 function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $model = new EstivoleModelMember();
     $this->user = JFactory::getUser();
     $userId = $this->user->id;
     $this->userProfile = JUserHelper::getProfile($userId);
     if (!$this->user->guest) {
         $this->state = $this->get('State');
         $this->member = $model->getItem($this->user->id);
         $this->form = $this->get('Form');
         $modelcalendars = new estivolemodelcalendars();
         $modeldaytime = new estivolemodeldaytime();
         $this->calendars = $modelcalendars->listitems();
         for ($i = 0; $i < count($this->calendars); $i++) {
             $this->calendars[$i]->member_daytimes = $modeldaytime->getmemberdaytimes($this->member->member_id, $this->calendars[$i]->calendar_id);
         }
     }
     //display
     return parent::display($tpl);
 }