123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Customer\Block\Adminhtml\Edit\Tab;
- use Magento\Customer\Controller\RegistryConstants;
- use Magento\Ui\Component\Layout\Tabs\TabInterface;
- /**
- * Customer account form block
- */
- class View extends \Magento\Backend\Block\Template implements TabInterface
- {
- /**
- * Core registry
- *
- * @var \Magento\Framework\Registry
- */
- protected $_coreRegistry;
- /**
- * @param \Magento\Backend\Block\Template\Context $context
- * @param \Magento\Framework\Registry $registry
- * @param array $data
- */
- public function __construct(
- \Magento\Backend\Block\Template\Context $context,
- \Magento\Framework\Registry $registry,
- array $data = []
- ) {
- $this->_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;
- }
- }
|