Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-asynchronous-operations
Controller
Adminhtml
Notification
Dismiss.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\AsynchronousOperations\Controller\Adminhtml\Notification
;
7
8
use
Magento\AsynchronousOperations\Model\BulkNotificationManagement
;
9
use
Magento\Backend\App\Action\Context
;
10
use
Magento\Backend\App\Action
;
11
use
Magento\Framework\Controller\ResultFactory
;
12
16
class
Dismiss
extends
Action
17
{
21
private
$notificationManagement;
22
29
public
function
__construct
(
30
Context
$context,
31
BulkNotificationManagement
$notificationManagement
32
) {
33
parent::__construct($context);
34
$this->notificationManagement = $notificationManagement;
35
}
36
40
protected
function
_isAllowed
()
41
{
42
return
$this->_authorization->isAllowed(
'Magento_Logging::system_magento_logging_bulk_operations'
);
43
}
44
48
public
function
execute
()
49
{
50
$bulkUuids = [];
51
foreach
((array)$this->
getRequest
()->getParam(
'uuid'
, []) as $bulkUuid) {
52
$bulkUuids[] = (string)$bulkUuid;
53
}
54
55
$isAcknowledged = $this->notificationManagement->acknowledgeBulks($bulkUuids);
56
58
$result
= $this->resultFactory->create(
ResultFactory::TYPE_JSON
);
59
if
(!$isAcknowledged) {
60
$result
->setHttpResponseCode(400);
61
}
62
63
return
$result
;
64
}
65
}
Magento\Framework\Controller\ResultFactory\TYPE_JSON
const TYPE_JSON
Definition:
ResultFactory.php:22
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\Framework\Controller\ResultFactory
Definition:
ResultFactory.php:17
Magento\AsynchronousOperations\Controller\Adminhtml\Notification\Dismiss\_isAllowed
_isAllowed()
Definition:
Dismiss.php:40
Magento\Framework\App\Action\AbstractAction\getRequest
getRequest()
Definition:
AbstractAction.php:60
Magento\Framework\App\ActionInterface\execute
execute()
Magento\Backend\App\Action
Definition:
Action.php:17
Magento\AsynchronousOperations\Model\BulkNotificationManagement
Definition:
BulkNotificationManagement.php:17
Magento\AsynchronousOperations\Controller\Adminhtml\Notification\Dismiss
Definition:
Dismiss.php:16
Magento\AsynchronousOperations\Controller\Adminhtml\Notification\Dismiss\__construct
__construct(Context $context, BulkNotificationManagement $notificationManagement)
Definition:
Dismiss.php:29
Magento\Backend\App\Action\Context
Definition:
Context.php:25
Magento\AsynchronousOperations\Controller\Adminhtml\Notification
Definition:
Dismiss.php:6
Magento\Backend\App\Action
Definition:
Context.php:6