示例#1
0
 /**
  * Fetches only the not installed Apps from the market urls
  *
  * @return array
  */
 public function getNotInstalledMarketApps()
 {
     $appList = $this->getAppMarket();
     /** @var App[] $installedApps */
     $installedApps = App::find()->all();
     foreach ($installedApps as $app) {
         if (array_key_exists($app->app_id, $appList)) {
             unset($appList[$app->app_id]);
         }
     }
     return $appList;
 }
示例#2
0
 /**
  * Search
  *
  * @param array $params
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = App::find();
     // create data provider
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['version' => $this->version, 'install_date' => $this->install_date]);
     $query->andFilterWhere(['like', 'description', $this->description]);
     $query->andFilterWhere(['like', 'name', $this->name]);
     return $dataProvider;
 }