/** * @return array web list for dropdown */ public function getWebOptions() { return ArrayHelper::map(WebRecord::find()->activeStatus()->all(), 'id', 'title'); }
/** * Lists all Web record models. * @return mixed */ public function actionIndex() { $dataProvider = new ActiveDataProvider(['query' => WebRecord::find()]); return $this->render('index', compact('dataProvider')); }
/** * Returns web id from given web text id * @param $textId * @return bool|string */ public static function getWebIdFromTextId($textId) { $id = WebRecord::find()->select('id')->where(['weburl' => $textId])->scalar(); return $id; }