本文整理汇总了PHP中entry::getFromCustomData方法的典型用法代码示例。如果您正苦于以下问题:PHP entry::getFromCustomData方法的具体用法?PHP entry::getFromCustomData怎么用?PHP entry::getFromCustomData使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类entry
的用法示例。
在下文中一共展示了entry::getFromCustomData方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: undeleteEntry
public static function undeleteEntry(entry $entry, $partner_id = null)
{
if ($entry->getStatus() != entryStatus::DELETED) {
return;
}
$data = $entry->getData();
$original_play = "";
$parts = explode("&", $data);
if (count($parts) < 2) {
$original_play = $data;
} else {
$original_play = $parts[0];
}
$deleted_file_path = $entry->getFromCustomData("deleted_file_path");
// echo $deleted_file_path . "\n";
$deleted_paths = explode("|", $deleted_file_path);
if ($deleted_paths) {
$original_play = @$deleted_paths[0];
$dataKey = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_DATA, @$deleted_paths[0]);
kFileSyncUtils::undeleteSyncFile($dataKey);
//$original = myContentStorage::moveFromDeleted ( @$deleted_paths[0] );
$dataEditKey = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_DATA_EDIT, @$deleted_paths[1]);
kFileSyncUtils::undeleteSyncFile($dataEditKey);
//$original = myContentStorage::moveFromDeleted ( @$deleted_paths[1] );
//figure out the thumb's path from the deleted path and the property deleted_original_thumb
$entry->setData(null);
$entry->setData($entry->getFromCustomData("deleted_original_data"), true);
// force the value that was set beforehand
// the data is supposed to point to a delete template 100000.flv&deleted_video.flv
$orig_thumb = $entry->getFromCustomData("deleted_original_thumb");
if (myContentStorage::isTemplate($orig_thumb)) {
$entry->setThumbnail($orig_thumb, true);
// the thumbnail wat a template- use it as it was
} else {
$entry->setThumbnail(null);
// reset the thumb before setting - it won't increment the version count
$entry->setThumbnail($entry->getFromCustomData("deleted_original_thumb"), true);
// force the value that was set beforehand
$thumbKey = $entry->getSyncKey(entry::FILE_SYNC_ENTRY_SUB_TYPE_THUMB, @$deleted_paths[2]);
kFileSyncUtils::undeleteSyncFile($thumbKey);
//$original = myContentStorage::moveFromDeleted ( @$deleted_paths[2] ); //
}
} else {
// error
}
$entry->setStatusReady();
}
示例2: getQuizData
/**
* @param entry $entry
* @return kQuiz
*/
public static function getQuizData(entry $entry)
{
$quizData = $entry->getFromCustomData(self::QUIZ_DATA);
return $quizData;
}
示例3: createFriendsMakeover
public static function createFriendsMakeover($subp_id, $puser_id, $puser_ids)
{
list($kshow_id, $roughcut_entry) = self::getFriendsMakover($subp_id, $puser_id);
if (!$kshow_id) {
return array(0, 0, 0);
}
$kshow = kshowPeer::retrieveByPK($kshow_id);
if (!$roughcut_entry) {
$roughcut_entry = new entry();
$roughcut_entry->setKshowId($kshow->getId());
$roughcut_entry->setKuserId($kshow->getProducerId());
$roughcut_entry->setCreatorKuserId($kshow->getProducerId());
$roughcut_entry->setPartnerId($kshow->getPartnerId());
$roughcut_entry->setSubpId($kshow->getSubpId());
$roughcut_entry->setStatus(entryStatus::READY);
$roughcut_entry->setThumbnail("&kal_show.jpg");
$roughcut_entry->setType(entryType::MIX);
$roughcut_entry->setMediaType(entry::ENTRY_MEDIA_TYPE_SHOW);
$roughcut_entry->setName("Kaltura Video");
$roughcut_entry->setTags("");
$roughcut_entry->save();
}
list($entry_ids, $entry_puser_ids) = self::getMakeoverEntries($subp_id, $puser_id, $puser_ids);
$custom_data = implode(",", $entry_puser_ids);
if ($roughcut_entry->getFromCustomData("facelift", $subp_id) == $custom_data) {
// if the users list didnt change use the current roughcut
return array($kshow_id, $roughcut_entry->getId(), 0);
}
$c = new Criteria();
$c->add(entryPeer::ID, $entry_ids, Criteria::IN);
$entries = entryPeer::doSelect($c);
self::createKEditorMetadata($kshow, $roughcut_entry, $entries);
$roughcut_entry->putInCustomData("facelift", $custom_data, $subp_id);
$roughcut_entry->save();
return array($kshow_id, $roughcut_entry->getId(), 1);
}
示例4: getEntryStatusBeforeScanFailure
protected static function getEntryStatusBeforeScanFailure(entry $entry)
{
return $entry->getFromCustomData(VirusScanPlugin::getPluginName() . '_' . self::CUSTOM_DATA_STATUS_BEFORE_SCAN_FAILURE);
}