本文整理汇总了PHP中entryFilter::setPartnerIdEquel方法的典型用法代码示例。如果您正苦于以下问题:PHP entryFilter::setPartnerIdEquel方法的具体用法?PHP entryFilter::setPartnerIdEquel怎么用?PHP entryFilter::setPartnerIdEquel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类entryFilter
的用法示例。
在下文中一共展示了entryFilter::setPartnerIdEquel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: postInsert
public function postInsert(PropelPDO $con = null)
{
parent::postInsert($con);
if (!$this->getFeedId() || !$this->getId()) {
return;
}
$syndicationFeed = syndicationFeedPeer::retrieveByPK($this->getFeedId());
if (!$syndicationFeed || !$syndicationFeed instanceof genericSyndicationFeed) {
return;
}
// "Creates advanced filter on distribution profile
$distributionAdvancedSearch = new ContentDistributionSearchFilter();
$distributionAdvancedSearch->setDistributionProfileId($this->getId());
$distributionAdvancedSearch->setDistributionSunStatus(EntryDistributionSunStatus::AFTER_SUNRISE);
$distributionAdvancedSearch->setEntryDistributionStatus(EntryDistributionStatus::READY);
$distributionAdvancedSearch->setEntryDistributionFlag(EntryDistributionDirtyStatus::NONE);
//Creates entry filter with advanced filter
$entryFilter = new entryFilter();
$entryFilter->setPartnerIdEquel($this->getPartnerId());
$entryFilter->setAdvancedSearch($distributionAdvancedSearch);
// Creates playlist with entry filter
$playlistXml = new SimpleXMLElement("<playlist/>");
$filtersXml = $playlistXml->addChild("filters");
$filterXml = $filtersXml->addChild("filter");
$entryFilter->toXml($filterXml);
$playlistContent = $playlistXml->asXML();
// creates playlist based on the filter XML
$playlist = new entry();
$playlist->setKuserId(kCurrentContext::$uid);
$playlist->setCreatorKuserId(kCurrentContext::$uid);
$playlist->setDisplayInSearch(mySearchUtils::DISPLAY_IN_SEARCH_SYSTEM);
$playlist->setPartnerId($this->getPartnerId());
$playlist->setStatus(entryStatus::READY);
$playlist->setKshowId(null);
$playlist->setType(entryType::PLAYLIST);
$playlist->setMediaType(entry::ENTRY_MEDIA_TYPE_XML);
$playlist->setDataContent($playlistContent);
$playlist->save();
KalturaLog::log("Playlist [" . $playlist->getId() . "] created");
// creates feed based on the playlist
$syndicationFeed->setPlaylistId($playlist->getId());
$syndicationFeed->save();
}