config = $config; $this->scopeConfig = $scopeConfig; } public function execute(Observer $observer) { $variable = $this->getConfig('athlete2_settings/blog/blog_list_page_layout'); if ($this->getConfig(Helper::XML_ENABLED) && !empty($variable)) { $this->config->setPageLayout($variable); } } public function getConfig($path, $storeCode = null) { $value = $this->scopeConfig->getValue($path, ScopeInterface::SCOPE_STORE, $storeCode); if (is_null($value)) { $value = ''; } return $value; } }