Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
MutableScopeConfig Class Reference
Inheritance diagram for MutableScopeConfig:
MutableScopeConfigInterface ScopeConfigInterface ReinitableConfig

Public Member Functions

 isSetFlag ($path, $scopeType=ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode=null)
 
 getValue ($path, $scopeType=ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode=null)
 
 setValue ( $path, $value, $scopeType=\Magento\Framework\App\Config\ScopeConfigInterface::SCOPE_TYPE_DEFAULT, $scopeCode=null)
 
 clean ()
 

Additional Inherited Members

- Data Fields inherited from ScopeConfigInterface
const SCOPE_TYPE_DEFAULT = 'default'
 

Detailed Description

Definition at line 18 of file MutableScopeConfig.php.

Member Function Documentation

◆ clean()

clean ( )

Clean app config cache

Parameters
string | null$type
Returns
void

Definition at line 62 of file MutableScopeConfig.php.

63  {
64  $this->getTestAppConfig()->clean();
65  }

◆ getValue()

getValue (   $path,
  $scopeType = ScopeConfigInterface::SCOPE_TYPE_DEFAULT,
  $scopeCode = null 
)

Retrieve config value by path and scope.

Parameters
string$pathThe path through the tree of configuration values, e.g., 'general/store_information/name'
string$scopeTypeThe scope to use to determine config value, e.g., 'store' or 'default'
null | string$scopeCode
Returns
mixed

Implements ScopeConfigInterface.

Definition at line 39 of file MutableScopeConfig.php.

40  {
41  return $this->getTestAppConfig()->getValue($path, $scopeType, $scopeCode);
42  }

◆ isSetFlag()

isSetFlag (   $path,
  $scopeType = ScopeConfigInterface::SCOPE_TYPE_DEFAULT,
  $scopeCode = null 
)
Parameters
string$path
string$scopeType
null$scopeCode
Returns
bool

Implements ScopeConfigInterface.

Definition at line 31 of file MutableScopeConfig.php.

32  {
33  return $this->getTestAppConfig()->isSetFlag($path, $scopeType, $scopeCode);
34  }

◆ setValue()

setValue (   $path,
  $value,
  $scopeType = \Magento\Framework\App\Config\ScopeConfigInterface::SCOPE_TYPE_DEFAULT,
  $scopeCode = null 
)

Set config value in the corresponding config scope

Parameters
string$path
mixed$value
string$scopeType
null | string$scopeCode
Returns
void

Implements MutableScopeConfigInterface.

Definition at line 47 of file MutableScopeConfig.php.

52  {
53  return $this->getTestAppConfig()->setValue($path, $value, $scopeType, $scopeCode);
54  }
$value
Definition: gender.phtml:16

The documentation for this class was generated from the following file: