本文整理汇总了PHP中entry::setDisplayInSearch方法的典型用法代码示例。如果您正苦于以下问题:PHP entry::setDisplayInSearch方法的具体用法?PHP entry::setDisplayInSearch怎么用?PHP entry::setDisplayInSearch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类entry
的用法示例。
在下文中一共展示了entry::setDisplayInSearch方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例2: getReplacingEntry
protected static function getReplacingEntry($recordedEntry, $asset, $retries = 1)
{
$replacingEntryId = $recordedEntry->getReplacingEntryId();
$replacingEntry = null;
// in replacement
if ($replacingEntryId) {
$replacingEntry = entryPeer::retrieveByPKNoFilter($replacingEntryId);
// check if asset already ingested
$replacingAsset = assetPeer::retrieveByEntryIdAndParams($replacingEntryId, $asset->getFlavorParamsId());
if ($replacingAsset) {
KalturaLog::err('Asset with params [' . $asset->getFlavorParamsId() . '] already replaced');
return null;
}
} else {
$advancedOptions = new kEntryReplacementOptions();
$advancedOptions->setKeepManualThumbnails(true);
$recordedEntry->setReplacementOptions($advancedOptions);
$replacingEntry = new entry();
$replacingEntry->setType(entryType::MEDIA_CLIP);
$replacingEntry->setMediaType(entry::ENTRY_MEDIA_TYPE_VIDEO);
$replacingEntry->setConversionProfileId($recordedEntry->getConversionProfileId());
$replacingEntry->setName($recordedEntry->getPartnerId() . '_' . time());
$replacingEntry->setKuserId($recordedEntry->getKuserId());
$replacingEntry->setAccessControlId($recordedEntry->getAccessControlId());
$replacingEntry->setPartnerId($recordedEntry->getPartnerId());
$replacingEntry->setSubpId($recordedEntry->getPartnerId() * 100);
$replacingEntry->setDefaultModerationStatus();
$replacingEntry->setDisplayInSearch(mySearchUtils::DISPLAY_IN_SEARCH_SYSTEM);
$replacingEntry->setReplacedEntryId($recordedEntry->getId());
$replacingEntry->save();
$recordedEntry->setReplacingEntryId($replacingEntry->getId());
$recordedEntry->setReplacementStatus(entryReplacementStatus::APPROVED_BUT_NOT_READY);
$affectedRows = $recordedEntry->save();
if (!$affectedRows) {
$replacingEntry->delete();
$replacingEntry = null;
if ($retries) {
sleep(10);
$recordedEntry = entryPeer::retrieveByPKNoFilter($recordedEntry->getId());
return kFlowHelper::getReplacingEntry($recordedEntry, $asset, 0);
} else {
KalturaLog::err("Failed to update replacing entry");
return null;
}
}
}
return $replacingEntry;
}
示例3: createReplacigEntry
private static function createReplacigEntry($recordedEntry)
{
$advancedOptions = new kEntryReplacementOptions();
$advancedOptions->setKeepManualThumbnails(true);
$recordedEntry->setReplacementOptions($advancedOptions);
$replacingEntry = new entry();
$replacingEntry->setType(entryType::MEDIA_CLIP);
$replacingEntry->setMediaType(entry::ENTRY_MEDIA_TYPE_VIDEO);
$replacingEntry->setConversionProfileId($recordedEntry->getConversionProfileId());
$replacingEntry->setName($recordedEntry->getPartnerId() . '_' . time());
$replacingEntry->setKuserId($recordedEntry->getKuserId());
$replacingEntry->setAccessControlId($recordedEntry->getAccessControlId());
$replacingEntry->setPartnerId($recordedEntry->getPartnerId());
$replacingEntry->setSubpId($recordedEntry->getPartnerId() * 100);
$replacingEntry->setDefaultModerationStatus();
$replacingEntry->setDisplayInSearch(mySearchUtils::DISPLAY_IN_SEARCH_SYSTEM);
$replacingEntry->setReplacedEntryId($recordedEntry->getId());
$replacingEntry->save();
$recordedEntry->setReplacingEntryId($replacingEntry->getId());
$recordedEntry->setReplacementStatus(entryReplacementStatus::APPROVED_BUT_NOT_READY);
$affectedRows = $recordedEntry->save();
return $replacingEntry;
}