scopeConfig = $scopeConfig; parent::__construct($context, $uiComponentFactory, $components, $data); } /** * Get robots.txt custom instruction default value * * @return string */ private function getRobotsDefaultCustomInstructions() { return trim((string)$this->scopeConfig->getValue( self::XML_PATH_ROBOTS_DEFAULT_CUSTOM_INSTRUCTIONS, ScopeConfigInterface::SCOPE_TYPE_DEFAULT )); } /** * Add js listener to reset button * * @return void * @throws \Magento\Framework\Exception\LocalizedException * @since 100.1.9 */ public function prepare() { parent::prepare(); $this->_data['config']['actions'] = [ [ 'actionName' => 'reset', 'targetName' => '${ $.name }', 'params' => [ json_encode($this->getRobotsDefaultCustomInstructions()) ] ] ]; } }