Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
View.php
Go to the documentation of this file.
1 <?php
7 
10 
15 {
21  protected $_coreRegistry;
22 
28  public function __construct(
29  \Magento\Backend\Block\Template\Context $context,
30  \Magento\Framework\Registry $registry,
31  array $data = []
32  ) {
33  $this->_coreRegistry = $registry;
34  parent::__construct($context, $data);
35  }
36 
40  public function getCustomerId()
41  {
42  return $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID);
43  }
44 
48  public function getTabLabel()
49  {
50  return __('Customer View');
51  }
52 
56  public function getTabTitle()
57  {
58  return __('Customer View');
59  }
60 
64  public function canShowTab()
65  {
66  if ($this->getCustomerId()) {
67  return true;
68  }
69  return false;
70  }
71 
75  public function isHidden()
76  {
77  if ($this->getCustomerId()) {
78  return false;
79  }
80  return true;
81  }
82 
88  public function getTabClass()
89  {
90  return '';
91  }
92 
98  public function getTabUrl()
99  {
100  return '';
101  }
102 
108  public function isAjaxLoaded()
109  {
110  return false;
111  }
112 }
__()
Definition: __.php:13
__construct(\Magento\Backend\Block\Template\Context $context, \Magento\Framework\Registry $registry, array $data=[])
Definition: View.php:28