本文整理汇总了PHP中entryPeer::setUserContentOnly方法的典型用法代码示例。如果您正苦于以下问题:PHP entryPeer::setUserContentOnly方法的具体用法?PHP entryPeer::setUserContentOnly怎么用?PHP entryPeer::setUserContentOnly使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类entryPeer
的用法示例。
在下文中一共展示了entryPeer::setUserContentOnly方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initService
public function initService($serviceId, $serviceName, $actionName)
{
$ks = kCurrentContext::$ks_object ? kCurrentContext::$ks_object : null;
if ($actionName == 'search' && (!$ks || !$ks->isAdmin() && !$ks->verifyPrivileges(ks::PRIVILEGE_LIST, ks::PRIVILEGE_WILDCARD))) {
KalturaCriterion::enableTag(KalturaCriterion::TAG_WIDGET_SESSION);
entryPeer::setUserContentOnly(true);
}
parent::initService($serviceId, $serviceName, $actionName);
if ($actionName != 'parse') {
$this->applyPartnerFilterForClass('asset');
$this->applyPartnerFilterForClass('CaptionAssetItem');
}
if (!CaptionSearchPlugin::isAllowedPartner($this->getPartnerId())) {
throw new KalturaAPIException(KalturaErrors::FEATURE_FORBIDDEN, CaptionSearchPlugin::PLUGIN_NAME);
}
}
示例2: initService
public function initService($serviceId, $serviceName, $actionName)
{
$ks = kCurrentContext::$ks_object ? kCurrentContext::$ks_object : null;
if (($actionName == 'list' || $actionName == 'count' || $actionName == 'listByReferenceId') && (!$ks || !$ks->isAdmin() && !$ks->verifyPrivileges(ks::PRIVILEGE_LIST, ks::PRIVILEGE_WILDCARD))) {
KalturaCriterion::enableTag(KalturaCriterion::TAG_WIDGET_SESSION);
entryPeer::setUserContentOnly(true);
}
/* //to support list categories with entitlmenet for user that is a member of more then 100 large categories
//large category is a category with > 10 members or > 100 entries.
if ($actionName == 'list' && kEntitlementUtils::getEntitlementEnforcement())
{
$dispatcher = KalturaDispatcher::getInstance();
$arguments = $dispatcher->getArguments();
$categoriesIds = array();
$categories = array();
foreach($arguments as $argument)
{
if ($argument instanceof KalturaBaseEntryFilter)
{
if(isset($argument->categoriesMatchAnd))
$categories = array_merge($categories, explode(',', $argument->categoriesMatchAnd));
if(isset($argument->categoriesMatchOr))
$categories = array_merge($categories, explode(',', $argument->categoriesMatchOr));
if(isset($argument->categoriesFullNameIn))
$categories = array_merge($categories, explode(',', $argument->categoriesFullNameIn));
if(count($categories))
{
$categories = categoryPeer::getByFullNamesExactMatch($categories);
foreach ($categories as $category)
$categoriesIds[] = $category->getId();
}
if(isset($argument->categoriesIdsMatchAnd))
$categoriesIds = array_merge($categoriesIds, explode(',', $argument->categoriesIdsMatchAnd));
if(isset($argument->categoriesIdsMatchOr))
$categoriesIds = array_merge($categoriesIds, explode(',', $argument->categoriesIdsMatchOr));
if(isset($argument->categoryAncestorIdIn))
$categoriesIds = array_merge($categoriesIds, explode(',', $argument->categoryAncestorIdIn));
}
}
foreach($categoriesIds as $key => $categoryId)
{
if(!$categoryId)
{
unset($categoriesIds[$key]);
}
}
if(count($categoriesIds))
entryPeer::setFilterdCategoriesIds($categoriesIds);
}*/
parent::initService($serviceId, $serviceName, $actionName);
$this->applyPartnerFilterForClass('ConversionProfile');
$this->applyPartnerFilterForClass('conversionProfile2');
}