Skip to content

Commit f9feef6

Browse files
MAGETWO-94909: [2.3] Fix scope selector for reports
1 parent b426452 commit f9feef6

File tree

3 files changed

+25
-5
lines changed

3 files changed

+25
-5
lines changed

app/code/Magento/Reports/Block/Adminhtml/Grid/AbstractGrid.php

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
namespace Magento\Reports\Block\Adminhtml\Grid;
88

9+
/**
10+
* Backend reports grid
11+
*/
912
class AbstractGrid extends \Magento\Backend\Block\Widget\Grid\Extended
1013
{
1114
/**
@@ -91,16 +94,17 @@ protected function _construct()
9194
/**
9295
* Get resource collection name
9396
*
94-
* @codeCoverageIgnore
95-
*
9697
* @return string
98+
* @codeCoverageIgnore
9799
*/
98100
public function getResourceCollectionName()
99101
{
100102
return $this->_resourceCollectionName;
101103
}
102104

103105
/**
106+
* Return reports collection
107+
*
104108
* @return \Magento\Framework\Data\Collection
105109
*/
106110
public function getCollection()
@@ -112,6 +116,8 @@ public function getCollection()
112116
}
113117

114118
/**
119+
* Retrieve array of columns that should be aggregated
120+
*
115121
* @return array
116122
*/
117123
protected function _getAggregatedColumns()
@@ -187,6 +193,8 @@ protected function _getStoreIds()
187193
}
188194

189195
/**
196+
* Apply sorting and filtering to collection
197+
*
190198
* @return $this|\Magento\Backend\Block\Widget\Grid
191199
* @SuppressWarnings(PHPMD.CyclomaticComplexity)
192200
* @SuppressWarnings(PHPMD.NPathComplexity)
@@ -276,6 +284,8 @@ protected function _prepareCollection()
276284
}
277285

278286
/**
287+
* Return count totals
288+
*
279289
* @return array
280290
*/
281291
public function getCountTotals()
@@ -315,6 +325,8 @@ public function getCountTotals()
315325
}
316326

317327
/**
328+
* Retrieve subtotal items
329+
*
318330
* @return array
319331
*/
320332
public function getSubTotals()
@@ -356,6 +368,8 @@ public function setStoreIds($storeIds)
356368
}
357369

358370
/**
371+
* Return current currency code
372+
*
359373
* @return string|\Magento\Directory\Model\Currency $currencyCode
360374
*/
361375
public function getCurrentCurrencyCode()
@@ -409,6 +423,7 @@ protected function _addCustomFilter($collection, $filterData)
409423
}
410424

411425
/**
426+
* Return stores by website, group and store id
412427
*
413428
* @return array
414429
* @throws \Magento\Framework\Exception\LocalizedException

app/code/Magento/Reports/Block/Adminhtml/Sales/Sales/Grid.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid
2424
protected $_columnGroupBy = 'period';
2525

2626
/**
27-
* {@inheritdoc}
27+
* Reports grid constructor
28+
*
2829
* @codeCoverageIgnore
2930
*/
3031
protected function _construct()
@@ -34,7 +35,9 @@ protected function _construct()
3435
}
3536

3637
/**
37-
* {@inheritdoc}
38+
* Return collection name based on report_type
39+
*
40+
* @return string
3841
*/
3942
public function getResourceCollectionName()
4043
{
@@ -44,7 +47,7 @@ public function getResourceCollectionName()
4447
}
4548

4649
/**
47-
* {@inheritdoc}
50+
* Initialize reports grid columns
4851
*
4952
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
5053
*/

app/code/Magento/Reports/Controller/Adminhtml/Report/AbstractReport.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
use Magento\Framework\Stdlib\DateTime\TimezoneInterface;
1717

1818
/**
19+
* Reports api controller
20+
*
1921
* @api
2022
* @since 100.0.2
2123
*/

0 commit comments

Comments
 (0)