Esempio n. 1
0
 /**
  * 2015-12-26
  * @param null|string|int|ScopeInterface $scope [optional]
  * @param string|null $scopeType [optional]
  * @param _ScopePool $scopePool [optional]
  * @return string
  */
 public static function code($scope = null, $scopeType = StoreScopeInterface::SCOPE_STORE, _ScopePool $scopePool = null)
 {
     /**
      * 2015-12-26
      * @see \Magento\Framework\App\Config::__construct()
      * https://github.com/magento/magento2/blob/2.0.0/lib/internal/Magento/Framework/App/Config.php#L24-L30
      */
     if (!$scopePool) {
         $scopePool = df_scope_pool();
     }
     return $scopePool->_getScopeCode(is_null($scopeType) ? StoreScopeInterface::SCOPE_STORE : $scopeType, $scope);
 }
Esempio n. 2
0
/**
 * 2016-07-30
 * @param int|string|null|ScopeA|Store $scope
 * @param string $scopeType [optional]
 * @return IConfigData|ConfigData
 */
function df_scope($scope, $scopeType = ScopeS::SCOPE_STORE)
{
    return df_scope_pool()->getScope($scopeType, $scope);
}