/**
  * Akce pro založení nového EasyMineru či otevření stávajícího
  */
 public function renderDefault()
 {
     $currentUser = $this->getCurrentUser();
     $this->template->miners = $this->minersFacade->findMinersByUser($currentUser);
     $this->datasourcesFacade->updateRemoteDatasourcesByUser($currentUser);
     $this->template->datasources = $this->datasourcesFacade->findDatasourcesByUser($currentUser, true);
     $this->template->dbTypes = $this->datasourcesFacade->getDbTypes(true);
 }
 /**
  * Akce vracející seznam datových zdrojů pro aktuálního uživatele
  * @SWG\Get(
  *   tags={"Datasources"},
  *   path="/datasources",
  *   summary="Get list of datasources for the current user",
  *   security={{"apiKey":{}},{"apiKeyHeader":{}}},
  *   produces={"application/json","application/xml"},
  *   @SWG\Response(
  *     response="200",
  *     description="List of datasources",
  *     @SWG\Schema(
  *       type="array",
  *       @SWG\Items(
  *         ref="#/definitions/DatasourceBasicResponse"
  *       )
  *     )
  *   )
  * )
  */
 public function actionList()
 {
     $this->setXmlMapperElements('datasources', 'datasource');
     $currentUser = $this->getCurrentUser();
     $this->datasourcesFacade->updateRemoteDatasourcesByUser($currentUser);
     $datasources = $this->datasourcesFacade->findDatasourcesByUser($currentUser, true);
     $result = [];
     if (!empty($datasources)) {
         foreach ($datasources as $datasource) {
             $result[] = $datasource->getDataArr();
         }
     }
     $this->resource = $result;
     $this->sendResource();
 }