alaa / magento2-scope-config-wrapper
Magento 2 模块
1.0.1
2019-07-07 20:18 UTC
Requires
- php: ~7.1.3|7.2.*
This package is auto-updated.
Last update: 2024-09-16 02:13:29 UTC
README
围绕范围配置读取器和写入器的包装模块
如何安装
composer require alaa/magento2-scope-config-wrapper
API
-
编写接口
\Alaa\ScopeConfig\Model\ScopeConfigWriterInterface$writer->saveWebsiteConfig($path, $value, $scopeId);$writer->saveStoreConfig($path, $value, $scopeId);$witer->saveDefaultConfig($path, $value);$writer->saveConfig($path, $value, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeId = 0);$writer->deleteWebsiteConfig($path, $scopeId);$writer->deleteStoreConfig($path, $scopeId);$writer->deleteDefaultConfig($path);$writer->deleteConfig($path, $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeId = 0);
-
读取接口
\Alaa\ScopeConfig\Model\ScopeConfigReaderInterface$reader->getDefaultConfigValue(string $path);$reader->getWebsiteConfigValue(string $path, $scopeId = null);$reader->getStoreConfigValue(string $path, $scopeId = null);$reader->getDefaultConfigFlag(string $path);$reader->getWebsiteConfigFlag(string $path, $scopeId = null);$reader->getStoreConfigFlag(string $path, $scopeId = null);$reader->getConfigValue(string $path, string $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeId = null);$reader->getConfigFlag(string $path, string $scope = ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeId = null);