Ejemplo n.º 1
0
 public static function setDefaultCriteriaFilter()
 {
     if (self::$s_criteria_filter == null) {
         self::$s_criteria_filter = new criteriaFilter();
     }
     $c = KalturaCriteria::create(CuePointPeer::OM_CLASS);
     $c->addAnd(CuePointPeer::STATUS, CuePointStatus::DELETED, Criteria::NOT_EQUAL);
     if (self::$userContentOnly) {
         $puserId = kCurrentContext::$ks_uid;
         $partnerId = kCurrentContext::$ks_partner_id;
         if ($puserId && $partnerId) {
             $kuser = kuserPeer::getKuserByPartnerAndUid($partnerId, $puserId);
             if (!$kuser) {
                 $kuser = kuserPeer::createKuserForPartner($partnerId, $puserId);
             }
             // Temporarily change user filter to (user==kuser OR cuepoint of type THUMB/CODE). Long term fix will be accomplished
             // by adding a public property on the cuepoint object and checking (user==kuser OR is public)
             //$c->addAnd(CuePointPeer::KUSER_ID, $kuser->getId());
             $criterionUserOrPublic = $c->getNewCriterion(CuePointPeer::KUSER_ID, $kuser->getId());
             $criterionUserOrPublic->addOr($c->getNewCriterion(self::IS_PUBLIC, true, Criteria::EQUAL));
             $criterionUserOrPublic->addTag(KalturaCriterion::TAG_USER_SESSION);
             $criterionUserOrPublic->addOr($c->getNewCriterion(CuePointPeer::TYPE, array(ThumbCuePointPlugin::getCuePointTypeCoreValue(ThumbCuePointType::THUMB), CodeCuePointPlugin::getCuePointTypeCoreValue(CodeCuePointType::CODE), AdCuePointPlugin::getCuePointTypeCoreValue(AdCuePointType::AD)), Criteria::IN));
             $c->addAnd($criterionUserOrPublic);
         }
     }
     self::$s_criteria_filter->setFilter($c);
 }
Ejemplo n.º 2
0
 /**
  * Applies default values to this object.
  * This method should be called from the object's constructor (or equivalent initialization method).
  * @see __construct()
  */
 public function applyDefaultValues()
 {
     $this->setType(ThumbCuePointPlugin::getCuePointTypeCoreValue(ThumbCuePointType::THUMB));
 }
Ejemplo n.º 3
0
 public function getTypeListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null, $type = null)
 {
     return parent::getTypeListResponse($pager, $responseProfile, ThumbCuePointPlugin::getCuePointTypeCoreValue(ThumbCuePointType::THUMB));
 }