Skip to content

Commit fac5ce4

Browse files
authored
ENGCOM-3777: [Backport] fixed Notification page Select Visible items issue #19910
2 parents c4b3044 + 67e9054 commit fac5ce4

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
namespace Magento\Backend\Block\Widget\Grid\Massaction;
77

88
use Magento\Backend\Block\Widget\Grid\Massaction\VisibilityCheckerInterface as VisibilityChecker;
9+
use Magento\Framework\Data\Collection\AbstractDb;
910
use Magento\Framework\DataObject;
1011

1112
/**
@@ -51,7 +52,7 @@ public function __construct(
5152
}
5253

5354
/**
54-
* @return void
55+
* @inheritdoc
5556
*/
5657
protected function _construct()
5758
{
@@ -216,6 +217,7 @@ public function getGridJsObjectName()
216217
* Retrieve JSON string of selected checkboxes
217218
*
218219
* @return string
220+
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
219221
*/
220222
public function getSelectedJson()
221223
{
@@ -230,6 +232,7 @@ public function getSelectedJson()
230232
* Retrieve array of selected checkboxes
231233
*
232234
* @return string[]
235+
* @SuppressWarnings(PHPMD.RequestAwareBlockMethod)
233236
*/
234237
public function getSelected()
235238
{
@@ -251,6 +254,8 @@ public function getApplyButtonHtml()
251254
}
252255

253256
/**
257+
* Get mass action javascript code.
258+
*
254259
* @return string
255260
*/
256261
public function getJavaScript()
@@ -267,6 +272,8 @@ public function getJavaScript()
267272
}
268273

269274
/**
275+
* Get grid ids in JSON format.
276+
*
270277
* @return string
271278
*/
272279
public function getGridIdsJson()
@@ -282,7 +289,11 @@ public function getGridIdsJson()
282289
} else {
283290
$massActionIdField = $this->getParentBlock()->getMassactionIdField();
284291
}
285-
292+
if ($allIdsCollection instanceof AbstractDb) {
293+
$allIdsCollection->getSelect()->limit();
294+
$allIdsCollection->clear();
295+
}
296+
286297
$gridIds = $allIdsCollection->setPageSize(0)->getColumnValues($massActionIdField);
287298
if (!empty($gridIds)) {
288299
return join(",", $gridIds);
@@ -291,6 +302,8 @@ public function getGridIdsJson()
291302
}
292303

293304
/**
305+
* Get Html id.
306+
*
294307
* @return string
295308
*/
296309
public function getHtmlId()

0 commit comments

Comments
 (0)