Skip to content

Commit f130812

Browse files
🔃 [EngCom] Public Pull Requests - 2.1-develop
Accepted Public Pull Requests: - #14894: [Backport] Fix aggregations use statements and return values (by @rogyar)
2 parents 9bc0af1 + 748ac77 commit f130812

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

app/code/Magento/Cms/Model/ResourceModel/Block/Grid/Collection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace Magento\Cms\Model\ResourceModel\Block\Grid;
77

88
use Magento\Framework\Api\Search\SearchResultInterface;
9-
use Magento\Framework\Search\AggregationInterface;
9+
use Magento\Framework\Api\Search\AggregationInterface;
1010
use Magento\Cms\Model\ResourceModel\Block\Collection as BlockCollection;
1111

1212
/**
@@ -82,6 +82,7 @@ public function getAggregations()
8282
public function setAggregations($aggregations)
8383
{
8484
$this->aggregations = $aggregations;
85+
return $this;
8586
}
8687

8788
/**

app/code/Magento/Cms/Model/ResourceModel/Page/Grid/Collection.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public function getAggregations()
8383
public function setAggregations($aggregations)
8484
{
8585
$this->aggregations = $aggregations;
86+
return $this;
8687
}
8788

8889
/**

app/code/Magento/Sales/Model/ResourceModel/Grid/Collection.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace Magento\Sales\Model\ResourceModel\Grid;
77

88
use Magento\Framework\Api\Search\SearchResultInterface;
9-
use Magento\Framework\Search\AggregationInterface;
9+
use Magento\Framework\Api\Search\AggregationInterface;
1010
use Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection;
1111

1212
/**
@@ -15,7 +15,6 @@
1515
*/
1616
class Collection extends AbstractCollection implements SearchResultInterface
1717
{
18-
1918
/**
2019
* @var AggregationInterface
2120
*/
@@ -78,9 +77,9 @@ public function getAggregations()
7877
public function setAggregations($aggregations)
7978
{
8079
$this->aggregations = $aggregations;
80+
return $this;
8181
}
8282

83-
8483
/**
8584
* Retrieve all ids for collection
8685
* Backward compatibility with EAV collection

0 commit comments

Comments
 (0)