Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
Config Class Reference
Inheritance diagram for Config:
ConfigInterface

Public Member Functions

 __construct (\Magento\Sales\Model\Config\Data $dataContainer, \Magento\Framework\App\State $appState)
 
 getTotalsRenderer ($section, $group, $code)
 
 getGroupTotals ($section, $group)
 
 getAvailableProductTypes ()
 

Protected Attributes

 $_dataContainer
 
 $_appState
 

Detailed Description

Definition at line 12 of file Config.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( \Magento\Sales\Model\Config\Data  $dataContainer,
\Magento\Framework\App\State  $appState 
)
Parameters
\Magento\Sales\Model\Config\Data$dataContainer
\Magento\Framework\App\State$appState

Definition at line 30 of file Config.php.

31  {
32  $this->_dataContainer = $dataContainer;
33  $this->_appState = $appState;
34  }

Member Function Documentation

◆ getAvailableProductTypes()

getAvailableProductTypes ( )

Get available product types

Returns
array

Implements ConfigInterface.

Definition at line 69 of file Config.php.

70  {
71  return $this->_dataContainer->get('order/available_product_types');
72  }

◆ getGroupTotals()

getGroupTotals (   $section,
  $group 
)

Retrieve totals for group e.g. quote, etc

Parameters
string$section
string$group
Returns
array

Implements ConfigInterface.

Definition at line 58 of file Config.php.

59  {
60  $path = implode('/', [$section, $group]);
61  return $this->_dataContainer->get($path);
62  }
$group
Definition: sections.phtml:16

◆ getTotalsRenderer()

getTotalsRenderer (   $section,
  $group,
  $code 
)

Retrieve renderer for area from config

Parameters
string$section
string$group
string$code
Returns
array

Implements ConfigInterface.

Definition at line 44 of file Config.php.

45  {
46  $path = implode('/', [$section, $group, $code, 'renderers', $this->_appState->getAreaCode()]);
47  return $this->_dataContainer->get($path);
48  }
$group
Definition: sections.phtml:16
$code
Definition: info.phtml:12

Field Documentation

◆ $_appState

$_appState
protected

Definition at line 24 of file Config.php.

◆ $_dataContainer

$_dataContainer
protected

Definition at line 19 of file Config.php.


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