Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Taxvat.php
Go to the documentation of this file.
1 <?php
8 
10 
16 class Taxvat extends AbstractWidget
17 {
26  public function __construct(
27  \Magento\Framework\View\Element\Template\Context $context,
28  \Magento\Customer\Helper\Address $addressHelper,
30  array $data = []
31  ) {
32  parent::__construct($context, $addressHelper, $customerMetadata, $data);
33  $this->_isScopePrivate = true;
34  }
35 
41  public function _construct()
42  {
43  parent::_construct();
44  $this->setTemplate('Magento_Customer::widget/taxvat.phtml');
45  }
46 
52  public function isEnabled()
53  {
54  return $this->_getAttribute('taxvat') ? (bool)$this->_getAttribute('taxvat')->isVisible() : false;
55  }
56 
62  public function isRequired()
63  {
64  return $this->_getAttribute('taxvat') ? (bool)$this->_getAttribute('taxvat')->isRequired() : false;
65  }
66 }
__construct(\Magento\Framework\View\Element\Template\Context $context, \Magento\Customer\Helper\Address $addressHelper, CustomerMetadataInterface $customerMetadata, array $data=[])
Definition: Taxvat.php:26