| Current Path : /home/rtorresani/www/vendor/magento/module-store/Ui/Component/Form/Fieldset/ |
| Current File : //home/rtorresani/www/vendor/magento/module-store/Ui/Component/Form/Fieldset/Websites.php |
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Store\Ui\Component\Form\Fieldset;
use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Framework\View\Element\UiComponentInterface;
use Magento\Store\Model\StoreManagerInterface as StoreManager;
use Magento\Ui\Component\Form\Fieldset;
/**
* Class Websites Fieldset
*/
class Websites extends Fieldset
{
/**
* Store manager
*
* @var StoreManager
*/
protected $storeManager;
/**
* Constructor
*
* @param ContextInterface $context
* @param StoreManager $storeManager
* @param UiComponentInterface[] $components
* @param array $data
*/
public function __construct(
ContextInterface $context,
StoreManager $storeManager,
array $components = [],
array $data = []
) {
parent::__construct($context, $components, $data);
$this->storeManager = $storeManager;
}
/**
* Prepare component configuration
*
* @return void
*/
public function prepare()
{
parent::prepare();
if ($this->storeManager->isSingleStoreMode()) {
$this->_data['config']['componentDisabled'] = true;
}
}
}