public static function filterSlider($sliders = array(), $_sliderData = array()) { foreach ($sliders as $key => $slider) { $mod_slider = new SliderLayer(); $mod_slider->mergeSlider($slider)->mergeParams($_sliderData); if ($mod_slider->getStatusTime() == Status::SLIDER_STATUS_ENABLE) { # validate module # validate module } else { # validate module unset($sliders[$key]); } } return $sliders; }
public function displayStatus($id_slide, $active, $group_id, $slide) { $title = (int) $active == 0 ? $this->l('Disabled') : $this->l('Enabled'); // $img = ((int) $active == 0 ? 'disabled.gif' : 'enabled.gif'); $src_img = _PS_ADMIN_IMG_; $mod_slider = new SliderLayer(); $mod_slider->mergeSlider($slide)->mergeParams($this->_sliderData); if ($mod_slider->getStatusTime() == Status::SLIDER_STATUS_DISABLE) { $img = 'disabled.gif'; } elseif ($mod_slider->getStatusTime() == Status::SLIDER_STATUS_ENABLE) { $img = 'enabled.gif'; } elseif ($mod_slider->getStatusTime() == Status::SLIDER_STATUS_COMING) { $img = 'coming.png'; $src_img = _MODULE_DIR_ . 'leosliderlayer/img/'; } $html = '<a href="' . AdminController::$currentIndex . '&configure=' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules') . '&changeStatus&sslider=' . (int) $id_slide . '&showsliders=1&id_group=' . (int) $group_id . '" title="' . $title . '"><img src="' . $src_img . '' . $img . '" alt="" /></a>'; return $html; }