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); }
public static function dependsOn() { $bulkUploadXmlVersion = new KalturaVersion(self::BULK_UPLOAD_XML_VERSION_MAJOR, self::BULK_UPLOAD_XML_VERSION_MINOR, self::BULK_UPLOAD_XML_VERSION_BUILD); $bulkUploadXmlDependency = new KalturaDependency(self::BULK_UPLOAD_XML_PLUGIN_NAME, $bulkUploadXmlVersion); $codeCuePointDependency = new KalturaDependency(CodeCuePointPlugin::getPluginName()); return array($bulkUploadXmlDependency, $codeCuePointDependency); }
public function __construct() { $this->cuePointType = CodeCuePointPlugin::getApiValue(CodeCuePointType::CODE); }
/** * 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(CodeCuePointPlugin::getCuePointTypeCoreValue(CodeCuePointType::CODE)); }
public function getTypeListResponse(KalturaFilterPager $pager, KalturaDetachedResponseProfile $responseProfile = null, $type = null) { return parent::getTypeListResponse($pager, $responseProfile, CodeCuePointPlugin::getCuePointTypeCoreValue(CodeCuePointType::CODE)); }