static function add($chapter_id, $video_id)
 {
     $log = new ChapterVideoID();
     $log->chapter_id = $chapter_id;
     $log->video_id = $video_id;
     $log->date = DateUtil::getCurrentTime();
     $log->save();
 }
示例#2
0
 public function setVideoAttribute($value)
 {
     if (isset($this->attributes[Chapter::ATTR_VIDEO])) {
         if ($this->attributes[Chapter::ATTR_VIDEO] != $value) {
             //Realizar un registro del antiguo slug
             Log\ChapterVideoID::add($this->attributes["id"], trim($this->attributes[Chapter::ATTR_VIDEO]));
         }
     }
     $this->attributes[Chapter::ATTR_VIDEO] = trim($value);
 }