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
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Paypal\Block\Adminhtml\Settlement;
/**
* Adminhtml paypal settlement reports grid block
*
* @api
* @author Magento Core Team <core@magentocommerce.com>
* @since 100.0.2
*/
class Report extends \Magento\Backend\Block\Widget\Grid\Container
{
/**
* Prepare grid container, add additional buttons
*
* @return void
*/
protected function _construct()
{
$this->_blockGroup = 'Magento_Paypal';
$this->_controller = 'adminhtml_settlement_report';
$this->_headerText = __('PayPal Settlement Reports');
parent::_construct();
$this->buttonList->remove('add');
$message = __(
'We are connecting to the PayPal SFTP server to retrieve new reports. Are you sure you want to continue?'
);
if (true == $this->_authorization->isAllowed('Magento_Paypal::fetch')) {
$this->buttonList->add(
'fetch',
[
'label' => __('Fetch Updates'),
'onclick' => "confirmSetLocation('{$message}', '{$this->getUrl('*/*/fetch')}')",
'class' => 'task'
]
);
}
}
}