Пример #1
0
 protected function getExternalApis()
 {
     $apis = ExternalAPIFactory::listAPI('Import', true);
     foreach ($apis as $name => $_) {
         if ($name == 'Google') {
             require_once 'include/externalAPI/Google/ExtAPIGoogle.php';
             $api = new ExtAPIGoogle();
             $client = $api->getClient();
             $loginUrl = $client->createAuthUrl();
         } else {
             $loginUrl = 'index.php?' . http_build_query(array('module' => 'EAPM', 'action' => 'EditView', 'application' => $name));
         }
         $apis[$name]['loginUrl'] = $loginUrl;
     }
     return $apis;
 }