1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\AsynchronousOperations\Controller\Adminhtml\Bulk;
/**
* Class View Operation Details Controller
*/
class Details extends \Magento\Backend\App\Action implements \Magento\Framework\App\Action\HttpGetActionInterface
{
/**
* @var \Magento\Framework\View\Result\PageFactory
*/
private $resultPageFactory;
/**
* @var \Magento\AsynchronousOperations\Model\AccessValidator
*/
private $accessValidator;
/**
* @var string
*/
private $menuId;
/**
* Details constructor.
* @param \Magento\Backend\App\Action\Context $context
* @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
* @param \Magento\AsynchronousOperations\Model\AccessValidator $accessValidator
* @param string $menuId
*/
public function __construct(
\Magento\Backend\App\Action\Context $context,
\Magento\Framework\View\Result\PageFactory $resultPageFactory,
\Magento\AsynchronousOperations\Model\AccessValidator $accessValidator,
$menuId = 'Magento_AsynchronousOperations::system_magento_logging_bulk_operations'
) {
$this->resultPageFactory = $resultPageFactory;
$this->accessValidator = $accessValidator;
$this->menuId = $menuId;
parent::__construct($context);
}
/**
* @inheritDoc
*/
protected function _isAllowed()
{
return $this->_authorization->isAllowed('Magento_Logging::system_magento_logging_bulk_operations')
&& $this->accessValidator->isAllowed($this->getRequest()->getParam('uuid'));
}
/**
* Bulk details action
*
* @return \Magento\Framework\View\Result\Page
*/
public function execute()
{
$bulkId = $this->getRequest()->getParam('uuid');
$resultPage = $this->resultPageFactory->create();
$resultPage->initLayout();
$this->_setActiveMenu($this->menuId);
$resultPage->getConfig()->getTitle()->prepend(__('Action Details - #' . $bulkId));
return $resultPage;
}
}