예제 #1
0
 /**
  * @return array web list for dropdown
  */
 public function getWebOptions()
 {
     return ArrayHelper::map(WebRecord::find()->activeStatus()->all(), 'id', 'title');
 }
예제 #2
0
 /**
  * Lists all Web record models.
  * @return mixed
  */
 public function actionIndex()
 {
     $dataProvider = new ActiveDataProvider(['query' => WebRecord::find()]);
     return $this->render('index', compact('dataProvider'));
 }
예제 #3
0
 /**
  * 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;
 }