public function run() { if (!$this->images) { $slider = new Slider(); $this->images = $slider->getActiveImages(); } $this->render('widgetSlider_list', array('images' => $this->images, 'imgCount' => $this->imgCount)); }