コード例 #1
0
ファイル: Carousel.php プロジェクト: TusharKDonda/maruti
 public function __construct($attributes = array())
 {
     $this->convertAttributesToConfig($attributes);
     if (!$this->getConfig('show')) {
         return;
     }
     if ($this->hasData("template")) {
         $my_template = $this->getData("template");
     } elseif (isset($attributes['template']) && $attributes['template']) {
         $my_template = $attributes['template'];
     } elseif (isset($attributes['block_template']) && $attributes['block_template']) {
         $my_template = $attributes['block_template'];
     } elseif ($this->getConfig('block_template')) {
         $my_template = $this->getConfig('block_template');
     } else {
         $carousel_mode = $this->getConfig("carousel_mode", "owl");
         if ($carousel_mode == "bootstrap") {
             $my_template = "ves/productlist/widget/carousel_bootstrap.phtml";
         } else {
             $my_template = "ves/productlist/widget/carousel.phtml";
         }
     }
     $this->setTemplate($my_template);
     parent::__construct($attributes);
 }
コード例 #2
0
ファイル: Tab.php プロジェクト: TusharKDonda/maruti
 /**
  * Initialize Tab template
  */
 public function __construct($attributes = array())
 {
     $this->convertAttributesToConfig($attributes);
     if (!$this->getConfig('show')) {
         return;
     }
     if ($this->hasData("template")) {
         $my_template = $this->getData("template");
     } elseif (isset($attributes['template']) && $attributes['template']) {
         $my_template = $attributes['template'];
     } elseif (isset($attributes['block_template']) && $attributes['block_template']) {
         $my_template = $attributes['block_template'];
     } elseif ($this->getConfig('block_template')) {
         $my_template = $this->getConfig('block_template');
     } else {
         $tab_layout_type = $this->getConfig("tab_layout_type", "tabs");
         $tab_layout_type = empty($tab_layout_type) ? "tabs" : $tab_layout_type;
         $my_template = "ves/productlist/widget/{$tab_layout_type}.phtml";
     }
     $this->setTemplate($my_template);
     parent::__construct($attributes);
 }