21 class DisableOutput extends \Magento\Config\Block\System\Config\Form\Fieldset
56 \
Magento\Backend\Model\Auth\Session $authSession,
57 \
Magento\Framework\View\Helper\Js $jsHelper,
58 \
Magento\Framework\Module\ModuleListInterface $moduleList,
61 parent::__construct($context, $authSession, $jsHelper,
$data);
62 $this->_moduleList = $moduleList;
77 $modules = $this->_moduleList->getNames();
79 $dispatchResult = new \Magento\Framework\DataObject($modules);
80 $this->_eventManager->dispatch(
81 'adminhtml_system_config_advanced_disableoutput_render_before',
82 [
'modules' => $dispatchResult]
84 $modules = $dispatchResult->toArray();
88 foreach ($modules as $moduleName) {
89 if ($moduleName ===
'Magento_Backend') {
105 if (empty($this->_dummyElement)) {
106 $this->_dummyElement = new \Magento\Framework\DataObject([
'showInDefault' => 1,
'showInWebsite' => 1]);
117 if (empty($this->_fieldRenderer)) {
118 $this->_fieldRenderer = $this->_layout->getBlockSingleton(
131 if (empty($this->_values)) {
133 [
'label' =>
__(
'Enable'),
'value' => 0],
134 [
'label' =>
__(
'Disable'),
'value' => 1],
149 $path =
'advanced/modules_disable_output/' . $moduleName;
155 $data = (int)(
string)$this->
getForm()->getConfigValue($path);
161 $field = $fieldset->addField(
165 'name' =>
'groups[modules_disable_output][fields][' . $moduleName .
'][value]',
166 'label' => $moduleName,
169 'inherit' => $inherit,
177 return $field->toHtml();