_init('revslider/slide'); } public function addSliderFilter($slider){ if ($slider instanceof AM_RevSlider_Model_Slider && $slider->getId()){ $this->addFieldToFilter('slider_id', array('eq' => $slider->getId())); }elseif (is_numeric($slider)){ $this->addFieldToFilter('slider_id', array('eq' => $slider)); }elseif (is_array($slider)){ $this->addFieldToFilter('slider_id', array('in' => $slider)); } return $this; } public function addIdsFilter($ids){ if (!$ids) return $this; if (!is_array($ids)) $ids = array($ids); $this->addFieldToFilter('id', array('in' => $ids)); return $this; } }