Example #1
0
 /**
  * Easily insert an item in the timeline.
  *
  * @param mixed Item to be inserted
  * @param IDF_Project Project of the item
  * @param Pluf_User Author of the item (null)
  * @param string GMT creation date time (null)
  * @return bool Success
  */
 public static function insert($item, $project, $author = null, $creation = null)
 {
     $t = new IDF_Timeline();
     $t->project = $project;
     $t->author = $author;
     $t->creation_dtime = is_null($creation) ? '' : $creation;
     $t->model_id = $item->id;
     $t->model_class = $item->_model;
     $t->create();
     return $t;
 }