Commit 6d6aba59f63a0ddd856e2a6c7ba1b9282c339db7

Authored by Alex Savenko
1 parent 108b193c

testing

backend/controllers/ReportController.php
@@ -14,8 +14,12 @@ use yii\web\Controller; @@ -14,8 +14,12 @@ use yii\web\Controller;
14 class ReportController extends Controller 14 class ReportController extends Controller
15 { 15 {
16 public function actionIndex() { 16 public function actionIndex() {
  17 + $service = new Google_Service_Translate(\Yii::$app->googleApi->client);
  18 + $result = $service->languages->listLanguages([
  19 + 'target' => 'ru'
  20 + ]);
17 return $this->render('index', [ 21 return $this->render('index', [
18 - 22 + 'result' => $result
19 ]); 23 ]);
20 } 24 }
21 } 25 }
22 \ No newline at end of file 26 \ No newline at end of file
backend/views/report/index.php
@@ -19,10 +19,7 @@ $this->params['breadcrumbs'][] = $this->title; @@ -19,10 +19,7 @@ $this->params['breadcrumbs'][] = $this->title;
19 <div> 19 <div>
20 <h1><?= Html::encode($this->title) ?></h1> 20 <h1><?= Html::encode($this->title) ?></h1>
21 <?php 21 <?php
22 - $service = new Google_Service_Translate(\Yii::$app->googleApi->client);  
23 - $result = $service->languages->listLanguages([  
24 - 'target' => 'ru'  
25 - ]); 22 +
26 print_r($result); 23 print_r($result);
27 ?> 24 ?>
28 </div> 25 </div>
29 \ No newline at end of file 26 \ No newline at end of file