Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Report.php
Go to the documentation of this file.
1 <?php
7 
15 class Report extends \Magento\Backend\Block\Widget\Grid\Container
16 {
22  protected function _construct()
23  {
24  $this->_blockGroup = 'Magento_Paypal';
25  $this->_controller = 'adminhtml_settlement_report';
26  $this->_headerText = __('PayPal Settlement Reports');
27  parent::_construct();
28  $this->buttonList->remove('add');
29  $message = __(
30  'We are connecting to the PayPal SFTP server to retrieve new reports. Are you sure you want to continue?'
31  );
32  if (true == $this->_authorization->isAllowed('Magento_Paypal::fetch')) {
33  $this->buttonList->add(
34  'fetch',
35  [
36  'label' => __('Fetch Updates'),
37  'onclick' => "confirmSetLocation('{$message}', '{$this->getUrl('*/*/fetch')}')",
38  'class' => 'task'
39  ]
40  );
41  }
42  }
43 }
__()
Definition: __.php:13
$message