Commit 46c90ebdea0b4a4dda565bf1168946db02b3a49d
1 parent
87710aed
dimensions +dynamics +multiple
Showing
1 changed file
with
7 additions
and
11 deletions
Show diff stats
app/library/App/Controllers/GaController.php
| ... | ... | @@ -53,17 +53,13 @@ class GaController extends CrudResourceController { |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | //Create the Dimensions object. |
| 56 | -// $dimension = []; | |
| 57 | -// $get_dimensions = explode(',', $get_dimensions); | |
| 58 | -// foreach ($get_dimensions as $dimension) { | |
| 59 | -// $dimension_obj = new Google_Service_AnalyticsReporting_Dimension(); | |
| 60 | -// $dimension_obj->setName("ga:".$get_dimensions); | |
| 61 | -// $dimension[] = $dimension_obj; | |
| 62 | -// } | |
| 63 | - //Create the Dimensions object. | |
| 64 | - $dimension_obj = new Google_Service_AnalyticsReporting_Dimension(); | |
| 65 | - $dimension_obj->setName("ga:".$get_dimensions); | |
| 66 | - $dimension[] = $dimension_obj; | |
| 56 | + $dimension = []; | |
| 57 | + $get_dimensions = explode(',', $get_dimensions); | |
| 58 | + foreach ($get_dimensions as $dimension) { | |
| 59 | + $dimension_obj = new Google_Service_AnalyticsReporting_Dimension(); | |
| 60 | + $dimension_obj->setName("ga:".$get_dimensions); | |
| 61 | + $dimension[] = $dimension_obj; | |
| 62 | + } | |
| 67 | 63 | |
| 68 | 64 | |
| 69 | 65 | // Создание объекта ReportRequest. | ... | ... |