url = $_SERVER['REQUEST_URI']; parent::init(); } public function run() { $widgetData = $this->findModel(); return $widgetData->{$this->row}; } protected function findModel() { if (($model = \common\models\Seo::findOne(['url'=>$this->url])) !== null) { return $model; } else { return new SeoSearch(); } } }