Example #1
0
 function addtotimeline($param, $date_now = null, $type_name, $uid = null, $model_alias = null, $f_key = null, $comment_id = null, $comment_type_name = null)
 {
     // If $date_now is not defined, save this event with current datetime
     if ($date_now == null) {
         $date_now = date('Y-m-d H:i:s');
     }
     //Importing TimelinesController
     App::import('Controller', 'Timelines');
     $controller = new TimelinesController();
     $controller->constructClasses();
     // Invoking addtimeline() method in TimelinesController
     $controller->add($param, $date_now, $type_name, $uid, $model_alias, $f_key, $comment_id, $comment_type_name);
 }
Example #2
0
 function addtotimeline($param, $date_now = null, $type_name = null, $uid = null)
 {
     // If $date_now is not defined, save this event with current datetime
     if ($date_now == null) {
         $date_now = date('Y-m-d H:i:s');
     }
     if ($type_name == null) {
         // Check for requesting controller and action
         $type_name = $this->params['controller'] . "-" . $this->action;
     }
     //Importing TimelinesController
     App::import('Controller', 'Timelines');
     $controller = new TimelinesController();
     $controller->constructClasses();
     // Invoking addtimeline() method in TimelinesController
     $controller->add($param, $date_now, $type_name, $uid);
 }