public function getImage($suffix = null, $refresh = false) { if ($this->_image === null || $refresh == true) { $this->_image = FileUtils::getImage(['imageName' => $this->image, 'imagePath' => $this->image_path, 'imagesFolder' => Yii::$app->params['images_folder'], 'imagesUrl' => Yii::$app->params['images_url'], 'suffix' => $suffix, 'defaultImage' => Yii::$app->params['default_image']]); } return $this->_image; }