![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/module-customer/Ui/Component/Form/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ declare(strict_types=1); namespace Magento\Customer\Ui\Component\Form; use Magento\Framework\View\Element\UiComponent\ContextInterface; use Magento\Framework\View\Element\ComponentVisibilityInterface; /** * Customer addresses fieldset class */ class AddressFieldset extends \Magento\Ui\Component\Form\Fieldset implements ComponentVisibilityInterface { /** * @param ContextInterface $context * @param array $components * @param array $data */ public function __construct( ContextInterface $context, array $components = [], array $data = [] ) { $this->context = $context; parent::__construct($context, $components, $data); } /** * Can show customer addresses tab in tabs or not * * Will return false for not registered customer in a case when admin user created new customer account. * Needed to hide addresses tab from create new customer page * * @return boolean */ public function isComponentVisible(): bool { $customerId = $this->context->getRequestParam('id'); return (bool)$customerId; } }