Ejemplo n.º 1
0
 public function test_insertFunction()
 {
     $view = new CalendarView();
     $js_function_object = 'function () { alert("Watch out, Gringo!"); }';
     $view->setInsertFunction($js_function_object);
     $this->assertEquals($js_function_object, $view->getInsertFunction());
 }
Ejemplo n.º 2
0
 /**
  * returns the previously set javasscript insert-function only
  * if read_only is not set.
  *
  * @return  string  name of js-function or anonymous js-function
  */
 public function getInsertFunction()
 {
     if (!$this->read_only) {
         return parent::getInsertFunction();
     }
     return false;
 }