예제 #1
0
파일: kshow.php 프로젝트: DBezemer/server
 public static function create($partner_id, $subp_id, $producer_id, $kshow_type)
 {
     $kshow = new kshow();
     $kshow->setPartnerId($partner_id);
     $kshow->setSubpId($subp_id);
     $kshow->setProducerId($producer_id);
     $kshow->setType($kshow_type);
     // will make sure the intro will have a good default
     $kshow->save();
     // to create a new kshow in the DB and use its ID for the entries creation
     $kshow->createEntry(entry::ENTRY_MEDIA_TYPE_SHOW, $producer_id);
     // roughcut
     $kshow->createEntry(entry::ENTRY_MEDIA_TYPE_VIDEO, $producer_id);
     // intro
     $kshow->save();
     // to finally save
     return $kshow;
 }
예제 #2
0
 protected function createDummyKShow()
 {
     $kshow = new kshow();
     $kshow->setName(kshow::DUMMY_KSHOW_NAME);
     $kshow->setProducerId($this->getKuser()->getId());
     $kshow->setPartnerId($this->getPartnerId());
     $kshow->setSubpId($this->getPartnerId() * 100);
     $kshow->setViewPermissions(kshow::KSHOW_PERMISSION_EVERYONE);
     $kshow->setPermissions(kshow::PERMISSIONS_PUBLIC);
     $kshow->setAllowQuickEdit(true);
     $kshow->save();
     return $kshow;
 }