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


PHP RevSlider::initByDBData方法代码示例

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


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

示例1: getArrSliders

 /**
  * 
  * get sliders array - function don't belong to the object!
  */
 public function getArrSliders($templates = false)
 {
     $where = "";
     $response = $this->db->fetch(GlobalsRevSlider::$table_sliders, $where, "id");
     $arrSliders = array();
     foreach ($response as $arrData) {
         $slider = new RevSlider();
         $slider->initByDBData($arrData);
         if ($templates) {
             if ($slider->getParam("template", "false") == "false") {
                 continue;
             }
         } else {
             if ($slider->getParam("template", "false") == "true") {
                 continue;
             }
         }
         $arrSliders[] = $slider;
     }
     return $arrSliders;
 }
开发者ID:ConceptHaus,项目名称:huasca,代码行数:25,代码来源:revslider_slider.class.php

示例2: foreach

				$tmpl->write_template_markup($template);
			}
		}*/
if (!empty($tp_template_slider)) {
    foreach ($tp_template_slider as $m_slider) {
        if ($m_slider['cat'] != 'Premium') {
            continue;
        }
        if (!empty($m_slider['filter']) && is_array($m_slider['filter'])) {
            foreach ($m_slider['filter'] as $f => $v) {
                $m_slider['filter'][$f] = 'temp_' . $v;
            }
        }
        if (!isset($m_slider['installed']) && !isset($m_slider['is_new'])) {
            $c_slider = new RevSlider();
            $c_slider->initByDBData($m_slider);
            $c_slides = $tmpl->getThemePunchTemplateSlides(array($m_slider));
            $c_title = $c_slider->getTitle();
            $width = $c_slider->getParam("width", 1240);
            $height = $c_slider->getParam("height", 868);
            if (!empty($c_slides)) {
                ?>
						<div class="template_group_wrappers <?php 
                if (isset($m_slider['filter'])) {
                    echo implode(' ', $m_slider['filter']);
                }
                ?>
">							
							<?php 
                echo '<div class="template_slider_title">';
                if (isset($m_slider['preview']) && $m_slider['preview'] !== '') {
开发者ID:Sibzsolutions,项目名称:Schiffrinpa,代码行数:31,代码来源:template-selector.php

示例3: getArrSliders

 /**
  * get sliders array - function don't belong to the object!
  */
 public function getArrSliders($orders = false, $templates = 'neither')
 {
     $order_fav = false;
     if ($orders !== false && key($orders) != 'favorite') {
         $order_direction = reset($orders);
         $do_order = key($orders);
     } else {
         $do_order = 'id';
         $order_direction = 'ASC';
         if (is_array($orders) && key($orders) == 'favorite') {
             $order_direction = reset($orders);
             $order_fav = true;
         }
     }
     $where = "`type` != 'template'";
     $response = $this->db->fetch(RevSliderGlobals::$table_sliders, $where, $do_order, '', $order_direction);
     $arrSliders = array();
     foreach ($response as $arrData) {
         $slider = new RevSlider();
         $slider->initByDBData($arrData);
         /*
         This part needs to stay for backwards compatibility. It is used in the update process from v4x to v5x
         */
         if ($templates === true) {
             if ($slider->getParam("template", "false") == "false") {
                 continue;
             }
         } elseif ($templates === false) {
             if ($slider->getParam("template", "false") == "true") {
                 continue;
             }
         }
         $arrSliders[] = $slider;
     }
     if ($order_fav === true) {
         $temp = array();
         $temp_not = array();
         foreach ($arrSliders as $key => $slider) {
             if ($slider->isFavorite()) {
                 $temp_not[] = $slider;
             } else {
                 $temp[] = $slider;
             }
         }
         $arrSliders = array();
         $arrSliders = $order_direction == 'ASC' ? array_merge($temp, $temp_not) : array_merge($temp_not, $temp);
     }
     return $arrSliders;
 }
开发者ID:VLabsInc,项目名称:WordPressPlatforms,代码行数:52,代码来源:slider.class.php

示例4: getArrSliders

 /**
  * 
  * get sliders array - function don't belong to the object!
  */
 public function getArrSliders($templates = false, $orders = false)
 {
     $where = "";
     if ($orders !== false) {
         $order_direction = reset($orders);
         $do_order = key($orders);
     } else {
         $do_order = 'id';
         $order_direction = 'ASC';
     }
     $where = "";
     $response = $this->db->fetch(GlobalsRevSlider::$table_sliders, $where, $do_order, '', $order_direction);
     $arrSliders = array();
     foreach ($response as $arrData) {
         $slider = new RevSlider();
         $slider->initByDBData($arrData);
         if ($templates) {
             if ($slider->getParam("template", "false") == "false") {
                 continue;
             }
         } else {
             if ($slider->getParam("template", "false") == "true") {
                 continue;
             }
         }
         $arrSliders[] = $slider;
     }
     return $arrSliders;
 }
开发者ID:networksoft,项目名称:networksoft.com.co,代码行数:33,代码来源:revslider_slider.class.php

示例5: getArrSliders

 /**
  * 
  * get sliders array - function don't belong to the object!
  */
 public function getArrSliders()
 {
     $where = "";
     $response = $this->db->fetch(GlobalsRevSlider::$table_sliders, $where, "id");
     $arrSliders = array();
     foreach ($response as $arrData) {
         $slider = new RevSlider();
         $slider->initByDBData($arrData);
         $arrSliders[] = $slider;
     }
     return $arrSliders;
 }
开发者ID:ashanrupasinghe,项目名称:govforuminstalledlocal,代码行数:16,代码来源:revslider_slider.class.php


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