|
| __construct (\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig, \Magento\Shipping\Model\CarrierFactory $carrierFactory, array $data=[]) |
|
| getActiveCarriers ($store=null) |
|
| getAllCarriers ($store=null) |
|
| __construct (array $data=[]) |
|
| addData (array $arr) |
|
| setData ($key, $value=null) |
|
| unsetData ($key=null) |
|
| getData ($key='', $index=null) |
|
| getDataByPath ($path) |
|
| getDataByKey ($key) |
|
| setDataUsingMethod ($key, $args=[]) |
|
| getDataUsingMethod ($key, $args=null) |
|
| hasData ($key='') |
|
| toArray (array $keys=[]) |
|
| convertToArray (array $keys=[]) |
|
| toXml (array $keys=[], $rootName='item', $addOpenTag=false, $addCdata=true) |
|
| convertToXml (array $arrAttributes=[], $rootName='item', $addOpenTag=false, $addCdata=true) |
|
| toJson (array $keys=[]) |
|
| convertToJson (array $keys=[]) |
|
| toString ($format='') |
|
| __call ($method, $args) |
|
| isEmpty () |
|
| serialize ($keys=[], $valueSeparator='=', $fieldSeparator=' ', $quote='"') |
|
| debug ($data=null, &$objects=[]) |
|
| offsetSet ($offset, $value) |
|
| offsetExists ($offset) |
|
| offsetUnset ($offset) |
|
| offsetGet ($offset) |
|
Class Config @api
- Since
- 100.0.2
Definition at line 16 of file Config.php.
◆ __construct()
Constructor
- Parameters
-
\Magento\Framework\App\Config\ScopeConfigInterface | $scopeConfig | |
\Magento\Shipping\Model\CarrierFactory | $carrierFactory | |
array | $data | |
Definition at line 48 of file Config.php.
53 $this->_scopeConfig = $scopeConfig;
54 $this->_carrierFactory = $carrierFactory;
55 parent::__construct(
$data);
◆ getActiveCarriers()
getActiveCarriers |
( |
|
$store = null | ) |
|
Retrieve active system carriers
- Parameters
-
- Returns
- AbstractCarrierInterface[]
Definition at line 64 of file Config.php.
67 $config = $this->_scopeConfig->getValue(
'carriers', \
Magento\Store\Model\ScopeInterface::SCOPE_STORE,
$store);
68 foreach (array_keys(
$config) as $carrierCode) {
69 if ($this->_scopeConfig->isSetFlag(
70 'carriers/' . $carrierCode .
'/active',
71 \
Magento\Store\Model\ScopeInterface::SCOPE_STORE,
74 $carrierModel = $this->_carrierFactory->create($carrierCode,
$store);
76 $carriers[$carrierCode] = $carrierModel;
◆ getAllCarriers()
getAllCarriers |
( |
|
$store = null | ) |
|
Retrieve all system carriers
- Parameters
-
- Returns
- AbstractCarrierInterface[]
Definition at line 89 of file Config.php.
92 $config = $this->_scopeConfig->getValue(
'carriers', \
Magento\Store\Model\ScopeInterface::SCOPE_STORE,
$store);
93 foreach (array_keys(
$config) as $carrierCode) {
94 $model = $this->_carrierFactory->create($carrierCode,
$store);
96 $carriers[$carrierCode] =
$model;
◆ $_carrierFactory
◆ $_scopeConfig
◆ XML_PATH_ORIGIN_CITY
const XML_PATH_ORIGIN_CITY = 'shipping/origin/city' |
◆ XML_PATH_ORIGIN_COUNTRY_ID
const XML_PATH_ORIGIN_COUNTRY_ID = 'shipping/origin/country_id' |
◆ XML_PATH_ORIGIN_POSTCODE
const XML_PATH_ORIGIN_POSTCODE = 'shipping/origin/postcode' |
◆ XML_PATH_ORIGIN_REGION_ID
const XML_PATH_ORIGIN_REGION_ID = 'shipping/origin/region_id' |
The documentation for this class was generated from the following file: