forked from magento/magento2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRollback.php
More file actions
46 lines (42 loc) · 999 Bytes
/
Rollback.php
File metadata and controls
46 lines (42 loc) · 999 Bytes
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
<?php
/**
* Copyright 2013 Adobe
* All Rights Reserved.
*/
/**
* Grid column block that is displayed only if rollback allowed
*/
namespace Magento\Backup\Block\Adminhtml\Grid\Column;
/**
* @api
* @since 100.0.2
*/
class Rollback extends \Magento\Backend\Block\Widget\Grid\Column
{
/**
* @var \Magento\Backup\Helper\Data
*/
protected $_backupHelper;
/**
* @param \Magento\Backend\Block\Template\Context $context
* @param \Magento\Backup\Helper\Data $backupHelper
* @param array $data
*/
public function __construct(
\Magento\Backend\Block\Template\Context $context,
\Magento\Backup\Helper\Data $backupHelper,
array $data = []
) {
$this->_backupHelper = $backupHelper;
parent::__construct($context, $data);
}
/**
* Check permission for rollback
*
* @return bool
*/
public function isDisplayed()
{
return $this->_backupHelper->isRollbackAllowed();
}
}