Example #1
0
 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;
 }