Example #1
0
 /**
  * Called by Events ImplicitArrayList when adding an event
  * 
  * @param array|FullCalendarEvent $event
  */
 function AddEvent($event)
 {
     if (is_array($event)) {
         $event = new FullCalendarEvent($event);
     }
     if (!$event instanceof FullCalendarEvent) {
         throw new Exception('Event must be an arrray or FullCalendarEvent object');
     }
     if ($this->ShowStatus == Component::Shown) {
         ClientScript::RaceQueue($this, 'jQuery.fullCalendar', "\$('#{$this}').fullCalendar", array('addEventSource', array($event->Properties)));
     } else {
         $this->Config['events'][] = $event->Properties;
     }
     $this->Events->Add($event, true);
 }
Example #2
0
 /**
  * Strips->Add() Delegate. Use $object->Strips->Add() instead of calling this method.
  */
 function AddStrip($strip)
 {
     $this->Strips->Add($strip, true);
     $this->SetToolbar($this->Strips->Elements);
 }