本文整理匯總了PHP中myEntryUtils::updatePuserIdsForEntries方法的典型用法代碼示例。如果您正苦於以下問題:PHP myEntryUtils::updatePuserIdsForEntries方法的具體用法?PHP myEntryUtils::updatePuserIdsForEntries怎麽用?PHP myEntryUtils::updatePuserIdsForEntries使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類myEntryUtils
的用法示例。
在下文中一共展示了myEntryUtils::updatePuserIdsForEntries方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: executeImpl
public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser, $create_cachekey = false)
{
myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL3;
// TODO - verify permissions for viewing lists
$detailed = $this->getP("detailed", false);
$limit = $this->getP("page_size", 10);
$limit = $this->maxPageSize($limit);
$page = $this->getP("page", 1);
$user_filter_prefix = $this->getP("fp", "filter");
$offset = ($page - 1) * $limit;
// TODO - should limit search to partner ??
// kuserPeer::setUseCriteriaFilter( false );
// entryPeer::setUseCriteriaFilter( false );
$playlist_id = $this->getPM("playlist_id");
$input_params = $this->getInputParams();
$extra_filters = array();
for ($i = 1; $i < self::MAX_FILTER_COUNT; $i++) {
// filter
$extra_filter = new entryFilter();
$fields_set = $extra_filter->fillObjectFromRequest($input_params, "{$user_filter_prefix}{$i}_", null);
if ($fields_set) {
$extra_filters[$i] = $extra_filter;
}
}
// this service is executed twice! (first time for the cache key, second time for the execution)
if (is_null($this->playlist)) {
$playlist = entryPeer::retrieveByPK($playlist_id);
if (!$playlist) {
throw new APIException(APIErrors::INVALID_ENTRY_ID, "Playlist", $playlist_id);
}
myPartnerUtils::addPartnerToCriteria(new accessControlPeer(), $playlist->getPartnerId(), $this->getPrivatePartnerData(), $this->partnerGroup2(), null);
$this->playlist = $playlist;
}
if ($create_cachekey) {
if ($this->isAdmin()) {
return null;
}
$cache_key_arr = array("playlist_id" => $playlist_id, "filters" => $extra_filters);
$cahce_key = new executionCacheKey();
$cahce_key->expiry = 600;
$cahce_key->key = md5(print_r($cache_key_arr, true));
return $cahce_key;
}
if ($this->isAdmin()) {
myPlaylistUtils::setIsAdminKs(true);
}
$entry_list = myPlaylistUtils::executePlaylistById($partner_id, $playlist_id, $extra_filters, $detailed);
myEntryUtils::updatePuserIdsForEntries($entry_list);
$level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
$wrapper = objectWrapperBase::getWrapperClass($entry_list, $level);
$this->addMsg("count", count($entry_list));
$this->addMsg($this->getObjectPrefix(), $wrapper);
}
示例2: executeImpl
public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser, $create_cachekey = false)
{
myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL3;
// TODO - verify permissions for viewing lists
$detailed = $this->getP("detailed", false);
if (!$detailed) {
$detailed = false;
}
$playlist_id = $this->getPM("playlist_id");
if ($create_cachekey) {
if ($this->isAdmin()) {
return null;
}
$ks_partner_id = null;
$privileges = null;
$ks = ks::fromSecureString(kCurrentContext::$ks);
if ($ks) {
$ks_partner_id = $ks->getPartnerId();
$privileges = $ks->getPrivileges();
}
$cache_key_arr = array("playlist_id" => $playlist_id, "partner_id" => $partner_id, "ks_partner_id" => $ks_partner_id, "detailed" => $detailed, "user" => kCurrentContext::$ks_uid, "privileges" => $privileges, "is_admin" => $this->isAdmin(), "protocol" => infraRequestUtils::getProtocol());
$cahce_key = new executionCacheKey();
$cahce_key->expiry = 600;
$cahce_key->key = md5(print_r($cache_key_arr, true));
return $cahce_key;
}
// this service is executed twice! (first time for the cache key, second time for the execution)
if (is_null($this->playlist)) {
$playlist = entryPeer::retrieveByPK($playlist_id);
if (!$playlist) {
throw new APIException(APIErrors::INVALID_ENTRY_ID, "Playlist", $playlist_id);
}
myPartnerUtils::addPartnerToCriteria('accessControl', $playlist->getPartnerId(), $this->getPrivatePartnerData(), $this->partnerGroup2(), null);
$this->playlist = $playlist;
}
if ($this->isAdmin()) {
myPlaylistUtils::setIsAdminKs(true);
}
$entry_list = myPlaylistUtils::executePlaylistById($partner_id, $playlist_id, null, $detailed);
myEntryUtils::updatePuserIdsForEntries($entry_list);
$level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
$wrapper = objectWrapperBase::getWrapperClass($entry_list, $level);
$this->addMsg("count", count($entry_list));
$this->addMsg($this->getObjectPrefix(), $wrapper);
}
示例3: executeImpl
public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
{
// TODO - verify permissions for viewing lists
$detailed = $this->getP("detailed", false);
if (!$detailed) {
$detailed = false;
}
$limit = $this->getP("page_size", 10);
$limit = $this->maxPageSize($limit);
$page = $this->getP("page", 1);
$user_filter_prefix = $this->getP("fp", "filter");
$offset = ($page - 1) * $limit;
// TODO - should limit search to partner ??
// kuserPeer::setUseCriteriaFilter( false );
// entryPeer::setUseCriteriaFilter( false );
$input_params = $this->getInputParams();
// fill the playlist (infact only the mediaType and contentData are important
$playlist = new entry();
$playlist->setType(entryType::PLAYLIST);
// prepare the playlist type before filling from request
$obj_wrapper = objectWrapperBase::getWrapperClass($playlist, 0);
$playlist->setMediaType($this->getP("playlist_mediaType"));
$data_content = $this->getP("playlist_dataContent");
$playlist->setDataContent($data_content);
/*
$updateable_fields = $obj_wrapper->getUpdateableFields() ;
$fields_modified = baseObjectUtils::fillObjectFromMapOrderedByFields( $input_params , $playlist , "playlist_" ,
$updateable_fields , BasePeer::TYPE_PHPNAME ,false );
*/
// rest is similar to the executeplaylist service
$extra_filters = array();
for ($i = 1; $i < self::MAX_FILTER_COUNT; $i++) {
// filter
$extra_filter = new entryFilter();
$fields_set = $extra_filter->fillObjectFromRequest($input_params, "{$user_filter_prefix}{$i}_", null);
$extra_filters[$i] = $extra_filter;
}
$entry_list = myPlaylistUtils::executePlaylist($partner_id, $playlist, $extra_filters, $detailed);
myEntryUtils::updatePuserIdsForEntries($entry_list);
$level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
$wrapper = objectWrapperBase::getWrapperClass($entry_list, $level);
$this->addMsg("count", count($entry_list));
$this->addMsg($this->getObjectPrefix(), $wrapper);
}
開發者ID:EfncoPlugins,項目名稱:Media-Management-based-on-Kaltura,代碼行數:44,代碼來源:executeplaylistfromcontentAction.class.php
示例4: executeImpl
public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
{
// TODO - verify permissions for viewing lists
$detailed = $this->getP("detailed", false);
if (!$detailed) {
$detailed = false;
}
// fill the playlist (infact only the mediaType and contentData are important
$playlist = new entry();
$playlist->setType(entryType::PLAYLIST);
// prepare the playlist type before filling from request
$obj_wrapper = objectWrapperBase::getWrapperClass($playlist, 0);
$playlist->setMediaType($this->getP("playlist_mediaType"));
$data_content = $this->getP("playlist_dataContent");
$playlist->setDataContent($data_content);
$entry_list = myPlaylistUtils::executePlaylist($partner_id, $playlist, null, $detailed);
myEntryUtils::updatePuserIdsForEntries($entry_list);
$level = $detailed ? objectWrapperBase::DETAIL_LEVEL_DETAILED : objectWrapperBase::DETAIL_LEVEL_REGULAR;
$wrapper = objectWrapperBase::getWrapperClass($entry_list, $level);
$this->addMsg("count", count($entry_list));
$this->addMsg($this->getObjectPrefix(), $wrapper);
}
示例5: executeFromContentAction
/**
* Retrieve playlist for playing purpose, based on content
* @disableTags TAG_WIDGET_SESSION
*
* @action executeFromContent
* @param KalturaPlaylistType $playlistType
* @param string $playlistContent
* @param string $detailed
* @param KalturaFilterPager $pager
* @return KalturaBaseEntryArray
*/
function executeFromContentAction($playlistType, $playlistContent, $detailed = false, $pager = null)
{
myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL3;
if ($this->getKs() && is_object($this->getKs()) && $this->getKs()->isAdmin()) {
myPlaylistUtils::setIsAdminKs(true);
}
$entryList = array();
if ($playlistType == KalturaPlaylistType::DYNAMIC) {
$entryList = myPlaylistUtils::executeDynamicPlaylist($this->getPartnerId(), $playlistContent, null, true, $pager);
} else {
if ($playlistType == KalturaPlaylistType::STATIC_LIST) {
$entryList = myPlaylistUtils::executeStaticPlaylistFromEntryIdsString($playlistContent, null, true, $pager);
}
}
myEntryUtils::updatePuserIdsForEntries($entryList);
return KalturaBaseEntryArray::fromDbArray($entryList, $this->getResponseProfile());
}
示例6: executeImpl
public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
{
myDbHelper::$use_alternative_con = myDbHelper::DB_HELPER_CONN_PROPEL3;
// TODO - verify permissions for viewing lists
$detailed = $this->getP("detailed", false);
$detailed_fields = $this->getP("detailed_fields");
$limit = $this->getP("page_size", 10);
$limit = $this->maxPageSize($limit);
$page = $this->getP("page", 1);
$offset = ($page - 1) * $limit;
kuserPeer::setUseCriteriaFilter(false);
//entryPeer::setUseCriteriaFilter( false );
$c = KalturaCriteria::create(entryPeer::OM_CLASS);
// filter
$filter = new entryFilter();
$fields_set = $filter->fillObjectFromRequest($this->getInputParams(), "filter_", null);
$this->setExtraFilters($filter);
$filter->setPartnerSearchScope(baseObjectFilter::MATCH_KALTURA_NETWORK_AND_PRIVATE);
$desired_status = "status:" . $filter->get("_eq_status") . "," . $filter->get("_in_status");
$display_deleted = $this->getP("display_deleted", false);
if ($display_deleted == "false") {
$display_deleted = false;
}
$pos = strpos($desired_status, entryStatus::DELETED);
if ($display_deleted || $pos !== false) {
entryPeer::allowDeletedInCriteriaFilter();
}
// hack for displaying pre-moderation
$moderation_status = $filter->get("_in_moderation_status");
if ($moderation_status && (strpos($moderation_status, "1,5") !== false || strpos($moderation_status, "5,1") !== false)) {
// this is when the KMC requests the moderated entries
$filter->set("_in_status", $filter->get("_in_status") . ",5");
// add the status '5'
}
$this->fixModerationStatusForBackwardCompatibility($filter);
$puser_kuser = null;
$use_filter_puser_id = $this->getP("use_filter_puser_id", 1);
if ($use_filter_puser_id == "false") {
$use_filter_puser_id = false;
}
if ($use_filter_puser_id) {
// if so - assume the producer_id is infact a puser_id and the kuser_id should be retrieved
$target_puser_id = $filter->get("_eq_user_id");
if ($target_puser_id !== null) {
$puser_kuser = PuserKuserPeer::retrieveByPartnerAndUid($partner_id, null, $target_puser_id, false);
if ($puser_kuser) {
$filter->set("_eq_user_id", $puser_kuser->getkuserId());
// $this->setP ( "filter__eq_producer_id" , $puser_kuser->getkuserId() );
}
}
}
$offset = ($page - 1) * $limit;
$c->setLimit($limit);
if ($offset > 0) {
$c->setOffset($offset);
}
$filter->attachToCriteria($c);
// for some entry types - there are no kshow or kusers - don't join even when detailed
if ($this->joinOnDetailed()) {
$list = entryPeer::doSelectJoinKuser($c);
} else {
$list = entryPeer::doSelect($c);
}
if ($detailed) {
$level = objectWrapperBase::DETAIL_LEVEL_DETAILED;
} else {
$level = objectWrapperBase::DETAIL_LEVEL_REGULAR;
}
$count = $c->getRecordsCount();
$this->addMsg("count", $count);
$this->addMsg("page_size", $limit);
$this->addMsg("page", $page);
myEntryUtils::updatePuserIdsForEntries($list);
if ($detailed_fields) {
$extra_fields = explode(",", $detailed_fields);
$wrapper = objectWrapperBase::getWrapperClass($list, $level, objectWrapperBase::DETAIL_VELOCITY_DEFAULT, 0, $extra_fields);
} else {
$wrapper = objectWrapperBase::getWrapperClass($list, $level);
}
$this->addMsg($this->getObjectPrefix(), $wrapper);
if ($use_filter_puser_id) {
$this->addMsg("user", objectWrapperBase::getWrapperClass($puser_kuser, objectWrapperBase::DETAIL_LEVEL_REGULAR));
}
}