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


PHP entryPeer::allowDeletedInCriteriaFilter方法代码示例

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


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

示例1: getObject

 public function getObject()
 {
     if ($this->m_object) {
         return $this->m_object;
     }
     $object_id = $this->object_id;
     if ($object_id == null) {
         return null;
     }
     switch ($this->getObjectType()) {
         case self::MODERATION_OBJECT_TYPE_KSHOW:
             $this->m_object = kshowPeer::retrieveByPK($object_id);
             break;
         case self::MODERATION_OBJECT_TYPE_ENTRY:
             // be able to fetch entries that are deleted
             entryPeer::allowDeletedInCriteriaFilter();
             $this->m_object = entryPeer::retrieveByPK($object_id);
             entryPeer::blockDeletedInCriteriaFilter();
             break;
         case self::MODERATION_OBJECT_TYPE_USER:
             // $object_id is the puser_id
             $puser_kuser = PuserKuserPeer::retrieveByPartnerAndUid($this->getPartnerId(), NULL, $object_id, true);
             if ($puser_kuser && $puser_kuser->getKuser()) {
                 $this->m_object = $puser_kuser->getKuser();
             }
             //				$this->m_object = kuserPeer::retrieveByPK( $object_id );
             break;
     }
     return $this->m_object;
 }
开发者ID:DBezemer,项目名称:server,代码行数:30,代码来源:moderation.php

示例2: executeImpl

 public function executeImpl($partner_id, $subp_id, $puser_id, $partner_prefix, $puser_kuser)
 {
     $entry_id = $this->getPM("entry_id");
     $moderation_status = $this->getPM("moderation_status");
     entryPeer::allowDeletedInCriteriaFilter();
     $entry = entryPeer::retrieveByPK($entry_id);
     if ($entry) {
         // when setting the moderation status- propagate to all related moderation objects
         $entry->moderate($moderation_status, true);
         $entry->setModerationCount(0);
         // set the number of unhandled flags to 0
         $entry->save();
         // for  no wodn't add an extra notification - one is sent from within the entry->moderate()
         // TODO - where is the best place to notify ??
         myNotificationMgr::createNotification(kNotificationJobData::NOTIFICATION_TYPE_ENTRY_UPDATE, $entry, null, null, null, null, $entry_id);
     }
     entryPeer::blockDeletedInCriteriaFilter();
     $wrapper = objectWrapperBase::getWrapperClass($entry, objectWrapperBase::DETAIL_LEVEL_DETAILED);
     if ($entry) {
         $wrapper->removeFromCache("entry", $entry->getId());
     }
     $this->addMsg("entry", $wrapper);
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:23,代码来源:updateentrymoderationAction.class.php

示例3: prepareEntriesCriteriaFilter

 /**
  * @param KalturaFilterPager $pager
  * @return KalturaCriteria
  */
 public function prepareEntriesCriteriaFilter(KalturaFilterPager $pager = null)
 {
     // because by default we will display only READY entries, and when deleted status is requested, we don't want this to disturb
     entryPeer::allowDeletedInCriteriaFilter();
     $c = KalturaCriteria::create(entryPeer::OM_CLASS);
     if ($this->idEqual == null && $this->redirectFromEntryId == null) {
         $this->setDefaultStatus();
         $this->setDefaultModerationStatus($this);
         if ($this->parentEntryIdEqual == null) {
             $c->add(entryPeer::DISPLAY_IN_SEARCH, mySearchUtils::DISPLAY_IN_SEARCH_SYSTEM, Criteria::NOT_EQUAL);
         }
     }
     $this->fixFilterUserId($this);
     $entryFilter = new entryFilter();
     $entryFilter->setPartnerSearchScope(baseObjectFilter::MATCH_KALTURA_NETWORK_AND_PRIVATE);
     $this->toObject($entryFilter);
     if ($pager) {
         $pager->attachToCriteria($c);
     }
     $entryFilter->attachToCriteria($c);
     return $c;
 }
开发者ID:visomar,项目名称:server,代码行数:26,代码来源:KalturaBaseEntryFilter.php

示例4: prepareEntriesCriteriaFilter

 /**
  * @param KalturaBaseEntryFilter $filter
  * @param KalturaFilterPager $pager
  * @return KalturaCriteria
  */
 protected function prepareEntriesCriteriaFilter(KalturaBaseEntryFilter $filter = null, KalturaFilterPager $pager = null)
 {
     if (!$filter) {
         $filter = new KalturaBaseEntryFilter();
     }
     // because by default we will display only READY entries, and when deleted status is requested, we don't want this to disturb
     entryPeer::allowDeletedInCriteriaFilter();
     $this->setDefaultStatus($filter);
     $this->setDefaultModerationStatus($filter);
     $this->fixFilterUserId($filter);
     $this->fixFilterDuration($filter);
     $entryFilter = new entryFilter();
     $entryFilter->setPartnerSearchScope(baseObjectFilter::MATCH_KALTURA_NETWORK_AND_PRIVATE);
     $filter->toObject($entryFilter);
     $c = KalturaCriteria::create(entryPeer::OM_CLASS);
     if ($pager) {
         $pager->attachToCriteria($c);
     }
     $entryFilter->attachToCriteria($c);
     $c->add(entryPeer::DISPLAY_IN_SEARCH, mySearchUtils::DISPLAY_IN_SEARCH_SYSTEM, Criteria::NOT_EQUAL);
     // when session is not admin and without list:* privilege, allow access to user entries only
     //moved to Additional criteria on entryPeer
     //moved it init service.
     /*if (!$this->getKs() || (!$this->getKs()->isAdmin() && !$this->getKs()->verifyPrivileges(ks::PRIVILEGE_LIST, ks::PRIVILEGE_WILDCARD)))
     		{
     			KalturaCriterion::enableTag(KalturaCriterion::TAG_WIDGET_SESSION);*/
     /*$filter->userIdEqual = $this->getKuser()->getPuserId();
     		
     			$crit = $c->getNewCriterion(entryPeer::KUSER_ID , $this->getKuser()->getId(), Criteria::EQUAL);
     			$c->addAnd($crit);*/
     /*}*/
     return $c;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:38,代码来源:KalturaEntryService.php

示例5: fprintf

    fprintf($stderr, "usage: findEntriesSizes yyyy-mm-dd\n");
    die;
}
$next_day = @$argv[2] ? $argv[2] : date('Y-m-d', strtotime($requested_day) + 86400);
while (1) {
    $c = new Criteria();
    $c->setLimit($limit_size);
    $c->setOffset($i);
    $c->add(entryPeer::MODIFIED_AT, $requested_day, Criteria::GREATER_EQUAL);
    $c->addAnd(entryPeer::MODIFIED_AT, $next_day, Criteria::LESS_THAN);
    $c->addAnd(entryPeer::TYPE, entryType::MEDIA_CLIP);
    $c->addAnd(entryPeer::PARTNER_ID, 100, Criteria::NOT_EQUAL);
    /**
     * Allow selecting deleted entries as well, so we will actually deduct storage for partners
     */
    entryPeer::allowDeletedInCriteriaFilter();
    $entries = entryPeer::doSelect($c);
    if (!count($entries)) {
        break;
    }
    foreach ($entries as $entry) {
        echo $entry->getId() . PHP_EOL;
        $prev_size = $entry->getStorageSize();
        $size = myEntryUtils::calcStorageSize($entry);
        if ($prev_size != $size) {
            $entry->setStorageSize($size);
            $entry->justSave();
        } else {
            $i++;
            continue;
            // skip entry because there was no change in size.
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:31,代码来源:findEntriesSizes.php

示例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));
     }
 }
开发者ID:DBezemer,项目名称:server,代码行数:84,代码来源:listentriesAction.class.php

示例7: prepareEntriesCriteriaFilter

 /**
  * @param KalturaBaseEntryFilter $filter
  * @param KalturaFilterPager $pager
  * @param string $partnerIdForScope
  * @return KalturaCriteria
  */
 protected function prepareEntriesCriteriaFilter(KalturaBaseEntryFilter $filter = null, KalturaFilterPager $pager = null, $partnerIdForScope)
 {
     if (!$filter) {
         $filter = new KalturaBaseEntryFilter();
     }
     // because by default we will display only READY entries, and when deleted status is requested, we don't want this to disturb
     entryPeer::allowDeletedInCriteriaFilter();
     // when session is not admin, allow access to user entries only
     if (!$this->getKs() || !$this->getKs()->isAdmin()) {
         $filter->userIdEqual = $this->getKuser()->getPuserId();
     }
     $this->setDefaultStatus($filter);
     $this->setDefaultModerationStatus($filter);
     $this->fixFilterUserId($filter);
     $this->fixFilterDuration($filter);
     $entryFilter = new entryFilter();
     if (is_null($partnerIdForScope)) {
         $entryFilter->setPartnerSearchScope($this->getPartnerId());
     } else {
         $entryFilter->setPartnerSearchScope($partnerIdForScope);
     }
     $filter->toObject($entryFilter);
     $c = KalturaCriteria::create(entryPeer::OM_CLASS);
     if ($pager) {
         $pager->attachToCriteria($c);
     }
     $entryFilter->attachToCriteria($c);
     return $c;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:35,代码来源:KalturaEntryService.php

示例8: executeImpl


//.........这里部分代码省略.........
                 }
                 if (count($extra_user_entries)) {
                     $kuser_entry_list = array_merge($extra_user_entries, $kuser_entry_list);
                 }
             }
         } else {
             $kuser_entry_list = array();
         }
         if ($merge_entry_lists) {
             $kshow_entry_list = kArray::append($kshow_entry_list, $kuser_entry_list);
             $kuser_entry_list = null;
         }
     }
     $this->benchmarkEnd("list_type_kuser");
     $this->benchmarkStart("list_type_episode");
     if ($list_type & self::LIST_TYPE_EPISODE) {
         if ($kshow && $kshow->getEpisodeId()) {
             // episode_id will point to the "parent" kshow
             // fetch the entries of the parent kshow
             $c = new Criteria();
             $c->addAnd(entryPeer::TYPE, entryType::MEDIA_CLIP);
             //				$c->addAnd ( entryPeer::MEDIA_TYPE , entry::ENTRY_MEDIA_TYPE_SHOW , Criteria::NOT_EQUAL );
             $c->addAnd(entryPeer::KSHOW_ID, $kshow->getEpisodeId());
             $this->addIgnoreIdList($c, $aggrigate_id_list);
             //				$this->addOffsetAndLimit ( $c ); // limit the number of the inherited entries from the episode
             if ($disable_user_data) {
                 $parent_kshow_entries = entryPeer::doSelect($c);
             } else {
                 $parent_kshow_entries = entryPeer::doSelectJoinkuser($c);
             }
             if (count($parent_kshow_entries)) {
                 $kshow_entry_list = kArray::append($kshow_entry_list, $parent_kshow_entries);
             }
         }
     }
     $this->benchmarkEnd("list_type_episode");
     // fetch all entries that were used in the roughcut - those of other kusers
     // - appeared under kuser_entry_list when someone else logged in
     $this->benchmarkStart("list_type_roughcut");
     $entry_data_from_roughcut_map = array();
     // will hold an associative array where the id is the key
     if ($list_type & self::LIST_TYPE_ROUGHCUT) {
         if ($entry->getType() == entryType::MIX) {
             $sync_key = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_DATA, $version);
             $roughcut_file_name = kFileSyncUtils::getReadyLocalFilePathForKey($sync_key);
             $entry_data_from_roughcut = myFlvStreamer::getAllAssetsData($roughcut_file_name);
             $final_id_list = array();
             foreach ($entry_data_from_roughcut as $data) {
                 $id = $data["id"];
                 // first element is the id
                 $entry_data_from_roughcut_map[] = $data;
                 $found = false;
                 foreach ($kshow_entry_list as $entry) {
                     // see we are not fetching duplicate entries
                     if ($entry->getId() == $id) {
                         $found = true;
                         break;
                     }
                 }
                 if (!$found) {
                     $final_id_list[] = $id;
                 }
             }
             if (count($final_id_list) > 0) {
                 // allow deleted entries when searching for entries on the roughcut
                 // don't forget to return the status at the end of the process
                 entryPeer::allowDeletedInCriteriaFilter();
                 $c = new Criteria();
                 $c->addAnd(entryPeer::ID, $final_id_list, Criteria::IN);
                 $c->addAnd(entryPeer::TYPE, entryType::MEDIA_CLIP);
                 $this->addIgnoreIdList($c, $aggrigate_id_list);
                 //				$this->addOffsetAndLimit ( $c );
                 if ($disable_user_data) {
                     $extra_entries = entryPeer::doSelect($c);
                 } else {
                     $extra_entries = entryPeer::doSelectJoinkuser($c);
                 }
                 // return the status to the criteriaFilter
                 entryPeer::blockDeletedInCriteriaFilter();
                 // merge the 2 lists into 1:
                 $kshow_entry_list = kArray::append($kshow_entry_list, $extra_entries);
             }
         }
     }
     $this->benchmarkEnd("list_type_roughcut");
     $this->benchmarkStart("create_wrapper");
     $entry_wrapper = objectWrapperBase::getWrapperClass($kshow_entry_list, objectWrapperBase::DETAIL_LEVEL_REGULAR, -3, 0, array("contributorScreenName"));
     //$entry_wrapper->addFields ( array ( "kuser.screenName" ) );
     $this->addMsg("show", $entry_wrapper);
     // if ! $disable_roughcut_entry_data - add the roughcut_entry_data
     if (!$disable_roughcut_entry_data) {
         $this->addMsg("roughcut_entry_data", $entry_data_from_roughcut_map);
     }
     if (count($kuser_entry_list) > 0) {
         $this->addMsg("user", objectWrapperBase::getWrapperClass($kuser_entry_list, objectWrapperBase::DETAIL_LEVEL_REGULAR));
     } else {
         $this->addMsg("user", null);
     }
     $this->benchmarkEnd("create_wrapper");
 }
开发者ID:DBezemer,项目名称:server,代码行数:101,代码来源:getallentriesAction.class.php


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