_coreRegistry = $registry; parent::__construct($context, $data); } /** * @return string|null */ public function getCustomerId() { return $this->_coreRegistry->registry(RegistryConstants::CURRENT_CUSTOMER_ID); } /** * @return \Magento\Framework\Phrase */ public function getTabLabel() { return __('Customer View'); } /** * @return \Magento\Framework\Phrase */ public function getTabTitle() { return __('Customer View'); } /** * @return bool */ public function canShowTab() { if ($this->getCustomerId()) { return true; } return false; } /** * @return bool */ public function isHidden() { if ($this->getCustomerId()) { return false; } return true; } /** * Tab class getter * * @return string */ public function getTabClass() { return ''; } /** * Return URL link to Tab content * * @return string */ public function getTabUrl() { return ''; } /** * Tab should be loaded trough Ajax call * * @return bool */ public function isAjaxLoaded() { return false; } }