Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
FraudDetails.php
Go to the documentation of this file.
1 <?php
7 
9 
15 {
19  protected $registry;
20 
26  public function __construct(
27  \Magento\Backend\Block\Template\Context $context,
28  \Magento\Framework\Registry $registry,
29  array $data = []
30  ) {
31  $this->registry = $registry;
32  parent::__construct($context, $data);
33  }
34 
38  public function getPayment()
39  {
40  $order = $this->registry->registry('current_order');
41  return $order->getPayment();
42  }
43 
47  protected function _toHtml()
48  {
49  return ($this->getPayment()->getMethod() === Directpost::METHOD_CODE) ? parent::_toHtml() : '';
50  }
51 }
__construct(\Magento\Backend\Block\Template\Context $context, \Magento\Framework\Registry $registry, array $data=[])
$order
Definition: order.php:55