当前位置: 首页>>代码示例>>PHP>>正文


PHP categoryPeer::s_criteria_filter方法代码示例

本文整理汇总了PHP中categoryPeer::s_criteria_filter方法的典型用法代码示例。如果您正苦于以下问题:PHP categoryPeer::s_criteria_filter方法的具体用法?PHP categoryPeer::s_criteria_filter怎么用?PHP categoryPeer::s_criteria_filter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在categoryPeer的用法示例。


在下文中一共展示了categoryPeer::s_criteria_filter方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setDefaultCriteriaFilter

 public static function setDefaultCriteriaFilter()
 {
     if (self::$s_criteria_filter == null) {
         self::$s_criteria_filter = new criteriaFilter();
     }
     $c = KalturaCriteria::create(categoryPeer::OM_CLASS);
     $partnerId = kCurrentContext::$ks_partner_id ? kCurrentContext::$ks_partner_id : kCurrentContext::$partner_id;
     if ($partnerId != Partner::BATCH_PARTNER_ID) {
         $c->add(self::STATUS, array(CategoryStatus::DELETED, CategoryStatus::PURGED), Criteria::NOT_IN);
     } else {
         $c->add(self::STATUS, CategoryStatus::PURGED, Criteria::NOT_EQUAL);
     }
     if (kEntitlementUtils::getEntitlementEnforcement()) {
         //add context as filter
         $privacyContextCrit = $c->getNewCriterion(self::PRIVACY_CONTEXTS, kEntitlementUtils::getKsPrivacyContext(), KalturaCriteria::IN_LIKE);
         $privacyContextCrit->addTag(KalturaCriterion::TAG_ENTITLEMENT_CATEGORY);
         $c->addAnd($privacyContextCrit);
         $crit = $c->getNewCriterion(self::DISPLAY_IN_SEARCH, DisplayInSearchType::PARTNER_ONLY, Criteria::EQUAL);
         $crit->addTag(KalturaCriterion::TAG_ENTITLEMENT_CATEGORY);
         $kuser = null;
         $ksString = kCurrentContext::$ks ? kCurrentContext::$ks : '';
         if ($ksString != '') {
             $partnerId = kCurrentContext::$partner_id ? kCurrentContext::$partner_id : kCurrentContext::$ks_partner_id;
             $kuser = kuserPeer::getActiveKuserByPartnerAndUid($partnerId, kCurrentContext::$ks_uid);
         }
         if ($kuser) {
             $membersCrit = $c->getNewCriterion(self::MEMBERS, $kuser->getId(), Criteria::LIKE);
             $membersCrit->addTag(KalturaCriterion::TAG_ENTITLEMENT_CATEGORY);
             $crit->addOr($membersCrit);
         }
         $c->addAnd($crit);
     }
     self::$s_criteria_filter->setFilter($c);
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:34,代码来源:categoryPeer.php

示例2: setDefaultCriteriaFilter

 public static function setDefaultCriteriaFilter()
 {
     if (self::$s_criteria_filter == null) {
         self::$s_criteria_filter = new criteriaFilter();
     }
     $c = new Criteria();
     $c->add(self::DELETED_AT, null, Criteria::EQUAL);
     self::$s_criteria_filter->setFilter($c);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:9,代码来源:categoryPeer.php

示例3: setDefaultCriteriaFilter

 public static function setDefaultCriteriaFilter()
 {
     if (self::$s_criteria_filter == null) {
         self::$s_criteria_filter = new criteriaFilter();
     }
     $c = KalturaCriteria::create(categoryPeer::OM_CLASS);
     $partnerId = kCurrentContext::$ks_partner_id ? kCurrentContext::$ks_partner_id : kCurrentContext::$partner_id;
     if ($partnerId != Partner::BATCH_PARTNER_ID || self::$ignoreDeleted) {
         $c->add(self::STATUS, array(CategoryStatus::DELETED, CategoryStatus::PURGED), Criteria::NOT_IN);
     } else {
         $c->add(self::STATUS, CategoryStatus::PURGED, Criteria::NOT_EQUAL);
     }
     if (kEntitlementUtils::getEntitlementEnforcement()) {
         //add context as filter
         $privacyContextCrit = $c->getNewCriterion(self::PRIVACY_CONTEXTS, kEntitlementUtils::getKsPrivacyContext(), KalturaCriteria::IN_LIKE);
         $privacyContextCrit->addTag(KalturaCriterion::TAG_ENTITLEMENT_CATEGORY);
         $c->addAnd($privacyContextCrit);
         $crit = $c->getNewCriterion(self::DISPLAY_IN_SEARCH, DisplayInSearchType::PARTNER_ONLY, Criteria::EQUAL);
         $crit->addTag(KalturaCriterion::TAG_ENTITLEMENT_CATEGORY);
         $kuser = null;
         $ksString = kCurrentContext::$ks ? kCurrentContext::$ks : '';
         if ($ksString != '') {
             $kuser = kCurrentContext::getCurrentKsKuser();
         }
         if ($kuser) {
             // get the groups that the user belongs to in case she is not associated to the category directly
             $kgroupIds = KuserKgroupPeer::retrieveKgroupIdsByKuserId($kuser->getId());
             $kgroupIds[] = $kuser->getId();
             $membersCrit = $c->getNewCriterion(self::MEMBERS, $kgroupIds, KalturaCriteria::IN_LIKE);
             $membersCrit->addTag(KalturaCriterion::TAG_ENTITLEMENT_CATEGORY);
             $crit->addOr($membersCrit);
         }
         $c->addAnd($crit);
     }
     self::$s_criteria_filter->setFilter($c);
 }
开发者ID:AdiTal,项目名称:server,代码行数:36,代码来源:categoryPeer.php


注:本文中的categoryPeer::s_criteria_filter方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。