本文整理汇总了PHP中RevSlide::getOrder方法的典型用法代码示例。如果您正苦于以下问题:PHP RevSlide::getOrder方法的具体用法?PHP RevSlide::getOrder怎么用?PHP RevSlide::getOrder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RevSlide
的用法示例。
在下文中一共展示了RevSlide::getOrder方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initBySlide
/**
*
* init by another slide
*/
private function initBySlide(RevSlide $slide)
{
$this->id = "template";
$this->templateID = $slide->getID();
$this->sliderID = $slide->getSliderID();
$this->slideOrder = $slide->getOrder();
$this->imageUrl = $slide->getImageUrl();
$this->imageID = $slide->getImageID();
$this->imageThumb = $slide->getThumbUrl();
$this->imageFilepath = $slide->getImageFilepath();
$this->imageFilename = $slide->getImageFilename();
$this->params = $slide->getParams();
$this->arrLayers = $slide->getLayers();
$this->arrChildren = $slide->getArrChildrenPure();
}
示例2: duplicateSlide
/**
*
* duplicate slide
*/
public function duplicateSlide($slideID)
{
$slide = new RevSlide();
$slide->initByID($slideID);
$order = $slide->getOrder();
$slides = $this->getSlidesFromGallery();
$newOrder = $order + 1;
$this->shiftOrder($newOrder);
//do duplication
$sqlSelect = "select " . GlobalsRevSlider::FIELDS_SLIDE . " from " . GlobalsRevSlider::$table_slides . " where id=" . $slideID;
$sqlInsert = "insert into " . GlobalsRevSlider::$table_slides . " (" . GlobalsRevSlider::FIELDS_SLIDE . ") ({$sqlSelect})";
$this->db->runSql($sqlInsert);
$lastID = $this->db->getLastInsertID();
UniteFunctionsRev::validateNotEmpty($lastID);
//update order
$arrUpdate = array("slide_order" => $newOrder);
$this->db->update(GlobalsRevSlider::$table_slides, $arrUpdate, array("id" => $lastID));
return $lastID;
}
示例3: __construct
//.........这里部分代码省略.........
$cssContent = $this->getSettings("css_captions_content");
$arrCaptionClasses = $operations->getArrCaptionClasses($cssContent);
$arrFontFamily = $operations->getArrFontFamilys($slider);
$arrCSS = $operations->getCaptionsContentArray();
$arrButtonClasses = $operations->getButtonClasses();
$urlCaptionsCSS = GlobalsRevSlider::$urlCaptionsCSS;
$arrAnim = $operations->getFullCustomAnimations();
//set layer caption as first caption class
$firstCaption = !empty($arrCaptionClasses) ? $arrCaptionClasses[0] : "";
$settingsLayer->updateSettingValue("layer_caption", $firstCaption);
//set stored values from "slide params"
$settingsSlide->setStoredValues($slideParams);
//init the settings output object
$settingsLayerOutput->init($settingsLayer);
$settingsSlideOutput->init($settingsSlide);
//set various parameters needed for the page
$width = $sliderParams["width"];
$height = $sliderParams["height"];
$imageUrl = $slide->getImageUrl();
$imageID = $slide->getImageID();
$imageFilename = $slide->getImageFilename();
$style = "height:" . $height . "px;";
//
$divLayersWidth = "width:" . $width . "px;";
$divbgminwidth = "min-width:" . $width . "px;";
//set iframe parameters
$iframeWidth = $width + 60;
$iframeHeight = $height + 50;
$iframeStyle = "width:" . $iframeWidth . "px;height:" . $iframeHeight . "px;";
$closeUrl = $this->getViewUrl(RevSliderAdmin::VIEW_SLIDES, "id=" . $sliderID);
$jsonLayers = UniteFunctionsRev::jsonEncodeForClientSide($arrLayers);
$jsonCaptions = UniteFunctionsRev::jsonEncodeForClientSide($arrCaptionClasses);
$jsonFontFamilys = UniteFunctionsRev::jsonEncodeForClientSide($arrFontFamily);
$arrCssStyles = UniteFunctionsRev::jsonEncodeForClientSide($arrCSS);
$arrCustomAnim = UniteFunctionsRev::jsonEncodeForClientSide($arrAnim);
//bg type params
$bgType = UniteFunctionsRev::getVal($slideParams, "background_type", "image");
$slideBGColor = UniteFunctionsRev::getVal($slideParams, "slide_bg_color", "#E7E7E7");
$divLayersClass = "slide_layers";
$bgSolidPickerProps = 'class="inputColorPicker slide_bg_color disabled" disabled="disabled"';
$bgFit = UniteFunctionsRev::getVal($slideParams, "bg_fit", "cover");
$bgFitX = intval(UniteFunctionsRev::getVal($slideParams, "bg_fit_x", "100"));
$bgFitY = intval(UniteFunctionsRev::getVal($slideParams, "bg_fit_y", "100"));
$bgPosition = UniteFunctionsRev::getVal($slideParams, "bg_position", "center top");
$bgPositionX = intval(UniteFunctionsRev::getVal($slideParams, "bg_position_x", "0"));
$bgPositionY = intval(UniteFunctionsRev::getVal($slideParams, "bg_position_y", "0"));
$bgEndPosition = UniteFunctionsRev::getVal($slideParams, "bg_end_position", "center top");
$bgEndPositionX = intval(UniteFunctionsRev::getVal($slideParams, "bg_end_position_x", "0"));
$bgEndPositionY = intval(UniteFunctionsRev::getVal($slideParams, "bg_end_position_y", "0"));
$kenburn_effect = UniteFunctionsRev::getVal($slideParams, "kenburn_effect", "off");
$kb_duration = UniteFunctionsRev::getVal($slideParams, "kb_duration", $sliderParams["delay"]);
$kb_easing = UniteFunctionsRev::getVal($slideParams, "kb_easing", "Linear.easeNone");
$kb_start_fit = UniteFunctionsRev::getVal($slideParams, "kb_start_fit", "100");
$kb_end_fit = UniteFunctionsRev::getVal($slideParams, "kb_end_fit", "100");
$bgRepeat = UniteFunctionsRev::getVal($slideParams, "bg_repeat", "no-repeat");
$slideBGExternal = UniteFunctionsRev::getVal($slideParams, "slide_bg_external", "");
$style_wrapper = '';
$class_wrapper = '';
switch ($bgType) {
case "trans":
$divLayersClass = "slide_layers";
$class_wrapper = "trans_bg";
break;
case "solid":
$style_wrapper .= "background-color:" . $slideBGColor . ";";
$bgSolidPickerProps = 'class="inputColorPicker slide_bg_color" style="background-color:' . $slideBGColor . '"';
break;
case "image":
$style_wrapper .= "background-image:url('" . $imageUrl . "');";
if ($bgFit == 'percentage') {
$style_wrapper .= "background-size: " . $bgFitX . '% ' . $bgFitY . '%;';
} else {
$style_wrapper .= "background-size: " . $bgFit . ";";
}
if ($bgPosition == 'percentage') {
$style_wrapper .= "background-position: " . $bgPositionX . '% ' . $bgPositionY . '%;';
} else {
$style_wrapper .= "background-position: " . $bgPosition . ";";
}
$style_wrapper .= "background-repeat: " . $bgRepeat . ";";
break;
case "external":
$style_wrapper .= "background-image:url('" . $slideBGExternal . "');";
if ($bgFit == 'percentage') {
$style_wrapper .= "background-size: " . $bgFitX . '% ' . $bgFitY . '%;';
} else {
$style_wrapper .= "background-size: " . $bgFit . ";";
}
if ($bgPosition == 'percentage') {
$style_wrapper .= "background-position: " . $bgPositionX . '% ' . $bgPositionY . '%;';
} else {
$style_wrapper .= "background-position: " . $bgPosition . ";";
}
$style_wrapper .= "background-repeat: " . $bgRepeat . ";";
break;
}
$slideTitle = $slide->getParam("title", "Slide");
$slideOrder = $slide->getOrder();
$this->assign('loadGoogleFont', $loadGoogleFont)->assign('settingsLayerOutput', $settingsLayerOutput)->assign('slider', $slider)->assign('slide', $slide)->assign('sliderTemplate', $sliderTemplate)->assign('slideOrder', $slideOrder)->assign('slideTitle', $slideTitle)->assign('slideDelay', $slideDelay)->assign('sliderParams', $sliderParams)->assign('arrSlideNames', $arrSlideNames)->assign('arrCustomAnim', $arrCustomAnim)->assign('slideID', $slideID)->assign('sliderID', $sliderID)->assign('settingsSlideOutput', $settingsSlideOutput)->assign('imageUrl', $imageUrl)->assign('imageID', $imageID)->assign('bgType', $bgType)->assign('slideBGColor', $slideBGColor)->assign('divLayersClass', $divLayersClass)->assign('bgSolidPickerProps', $bgSolidPickerProps)->assign('bgFit', $bgFit)->assign('bgFitX', $bgFitX)->assign('bgFitY', $bgFitY)->assign('bgRepeat', $bgRepeat)->assign('bgPosition', $bgPosition)->assign('bgPositionX', $bgPositionX)->assign('bgPositionY', $bgPositionY)->assign('bgEndPosition', $bgEndPosition)->assign('bgEndPositionX', $bgEndPositionX)->assign('bgEndPositionY', $bgEndPositionY)->assign('slideBGExternal', $slideBGExternal)->assign('slideBGColor', $slideBGColor)->assign('style', $style)->assign('iframeStyle', $iframeStyle)->assign('closeUrl', $closeUrl)->assign('jsonLayers', $jsonLayers)->assign('jsonCaptions', $jsonCaptions)->assign('jsonFontFamilys', $jsonFontFamilys)->assign('arrCssStyles', $arrCssStyles)->assign('arrButtonClasses', $arrButtonClasses)->assign('urlCaptionsCSS', $urlCaptionsCSS)->assign('divLayersWidth', $divLayersWidth)->assign('divbgminwidth', $divbgminwidth)->assign('style_wrapper', $style_wrapper)->assign('class_wrapper', $class_wrapper)->assign('kenburn_effect', $kenburn_effect)->assign('kb_duration', $kb_duration)->assign('kb_easing', $kb_easing)->assign('kb_start_fit', $kb_start_fit)->assign('kb_end_fit', $kb_end_fit);
}
示例4: RevSliderOperations
$style_wrapper .= "background-image:url('" . $slideBGExternal . "');";
if ($bgFit == 'percentage') {
$style_wrapper .= "background-size: " . $bgFitX . '% ' . $bgFitY . '%;';
} else {
$style_wrapper .= "background-size: " . $bgFit . ";";
}
if ($bgPosition == 'percentage') {
$style_wrapper .= "background-position: " . $bgPositionX . '% ' . $bgPositionY . '%;';
} else {
$style_wrapper .= "background-position: " . $bgPosition . ";";
}
$style_wrapper .= "background-repeat: " . $bgRepeat . ";";
break;
}
$slideTitle = $slide->getParam("title", "Slide");
$slideOrder = $slide->getOrder();
//treat multilanguage
$isWpmlExists = RevSliderWpml::isWpmlExists();
$useWpml = $slider->getParam("use_wpml", "off");
$wpmlActive = false;
if (!$slide->isStaticSlide()) {
if ($isWpmlExists && $useWpml == "on") {
$wpmlActive = true;
$parentSlide = $slide->getParentSlide();
$arrChildLangs = $parentSlide->getArrChildrenLangs();
}
}
//<!-- load good font -->
$operations = new RevSliderOperations();
$googleFont = $slider->getParam("google_font", array());
if (!empty($googleFont)) {
示例5: getStaticSlideForExport
/**
*
* get slides for export
*/
private function getStaticSlideForExport($useDummy = false)
{
$arrSlidesExport = array();
$slide = new RevSlide();
$staticID = $slide->getStaticSlideID($this->id);
if ($staticID !== false) {
$slideNew = array();
$slide->initByStaticID($staticID);
$slideNew["params"] = $slide->getParamsForExport();
$slideNew["slide_order"] = $slide->getOrder();
$slideNew["layers"] = $slide->getLayersForExport($useDummy);
$arrSlidesExport[] = $slideNew;
}
return $arrSlidesExport;
}