Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions
ConfigurableInfo Class Reference
Inheritance diagram for ConfigurableInfo:
Info Template AbstractBlock DataObject BlockInterface Info

Public Member Functions

 __construct (Context $context, ConfigInterface $config, array $data=[])
 
- Public Member Functions inherited from Info
 getInfo ()
 
 getMethod ()
 
 toPdf ()
 
 getChildPdfAsArray ()
 
 getSpecificInformation ()
 
 getValueAsArray ($value, $escapeHtml=false)
 
 getIsSecureMode ()
 
- Public Member Functions inherited from Template
 __construct (Template\Context $context, array $data=[])
 
 setTemplateContext ($templateContext)
 
 getTemplate ()
 
 setTemplate ($template)
 
 getTemplateFile ($template=null)
 
 getArea ()
 
 assign ($key, $value=null)
 
 fetchView ($fileName)
 
 getBaseUrl ()
 
 getObjectData (\Magento\Framework\DataObject $object, $key)
 
 getCacheKeyInfo ()
 
- Public Member Functions inherited from AbstractBlock
 __construct (\Magento\Framework\View\Element\Context $context, array $data=[])
 
 getJsLayout ()
 
 getRequest ()
 
 getParentBlock ()
 
 setLayout (\Magento\Framework\View\LayoutInterface $layout)
 
 getLayout ()
 
 setNameInLayout ($name)
 
 getChildNames ()
 
 setAttribute ($name, $value=null)
 
 setChild ($alias, $block)
 
 addChild ($alias, $block, $data=[])
 
 unsetChild ($alias)
 
 unsetCallChild ($alias, $callback, $result, $params)
 
 unsetChildren ()
 
 getChildBlock ($alias)
 
 getChildHtml ($alias='', $useCache=true)
 
 getChildChildHtml ($alias, $childChildAlias='', $useCache=true)
 
 getBlockHtml ($name)
 
 insert ($element, $siblingName=0, $after=true, $alias='')
 
 append ($element, $alias='')
 
 getGroupChildNames ($groupName)
 
 getChildData ($alias, $key='')
 
 getUiId ($arg1=null, $arg2=null, $arg3=null, $arg4=null, $arg5=null)
 
 getJsId ($arg1=null, $arg2=null, $arg3=null, $arg4=null, $arg5=null)
 
 getUrl ($route='', $params=[])
 
 getViewFileUrl ($fileId, array $params=[])
 
 formatDate ( $date=null, $format=\IntlDateFormatter::SHORT, $showTime=false, $timezone=null)
 
 formatTime ( $time=null, $format=\IntlDateFormatter::SHORT, $showDate=false)
 
 getModuleName ()
 
 escapeHtml ($data, $allowedTags=null)
 
 escapeJs ($string)
 
 escapeHtmlAttr ($string, $escapeSingleQuote=true)
 
 escapeCss ($string)
 
 stripTags ($data, $allowableTags=null, $allowHtmlEntities=false)
 
 escapeUrl ($string)
 
 escapeXssInUrl ($data)
 
 escapeQuote ($data, $addSlashes=false)
 
 escapeJsQuote ($data, $quote='\'')
 
 getNameInLayout ()
 
 getCacheKeyInfo ()
 
 getCacheKey ()
 
 getVar ($name, $module=null)
 
 isScopePrivate ()
 
- Public Member Functions inherited from DataObject
 __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)
 
- Public Member Functions inherited from BlockInterface
 toHtml ()
 

Protected Member Functions

 _prepareSpecificInformation ($transport=null)
 
 setDataToTransfer (\Magento\Framework\DataObject $transport, $field, $value)
 
 getLabel ($field)
 
 getValueView ($field, $value)
 
- Protected Member Functions inherited from Info
 _prepareSpecificInformation ($transport=null)
 
- Protected Member Functions inherited from Template
 _construct ()
 
 _toHtml ()
 
 getRootDirectory ()
 
 getMediaDirectory ()
 
- Protected Member Functions inherited from AbstractBlock
 _construct ()
 
 _prepareLayout ()
 
 _beforeToHtml ()
 
 _afterToHtml ($html)
 
 _toHtml ()
 
 _getNotFoundUrl ($route='', $params=['_direct'=> 'core/index/notFound'])
 
 getCacheTags ()
 
 getCacheLifetime ()
 
 _loadCache ()
 
 _saveCache ($data)
 
 _getSidPlaceholder ($cacheKey=null)
 
- Protected Member Functions inherited from DataObject
 _getData ($key)
 
 _underscore ($name)
 

Additional Inherited Members

- Static Public Member Functions inherited from AbstractBlock
static extractModuleName ($className)
 
- Data Fields inherited from Template
const XML_PATH_TEMPLATE_ALLOW_SYMLINK = 'dev/template/allow_symlink'
 
- Data Fields inherited from AbstractBlock
const CACHE_GROUP = \Magento\Framework\App\Cache\Type\Block::TYPE_IDENTIFIER
 
const CACHE_KEY_PREFIX = 'BLOCK_'
 
- Protected Attributes inherited from Info
 $_paymentSpecificInformation
 
 $_template = 'Magento_Payment::info/default.phtml'
 
- Protected Attributes inherited from Template
 $_viewVars = []
 
 $_baseUrl
 
 $_jsUrl
 
 $_allowSymlinks
 
 $_filesystem
 
 $_template
 
 $templateEnginePool
 
 $_storeManager
 
 $_appState
 
 $directory
 
 $templateContext
 
 $pageConfig
 
 $resolver
 
 $validator
 
- Protected Attributes inherited from AbstractBlock
 $_design
 
 $_session
 
 $_sidResolver
 
 $_nameInLayout
 
 $_layout
 
 $jsLayout = []
 
 $_request
 
 $_urlBuilder
 
 $_eventManager
 
 $_frontController
 
 $_assetRepo
 
 $_viewConfig
 
 $_cacheState
 
 $_logger
 
 $_escaper
 
 $filterManager
 
 $_localeDate
 
 $inlineTranslation
 
 $_isScopePrivate = false
 
 $_scopeConfig
 
 $_cache
 
- Protected Attributes inherited from DataObject
 $_data = []
 
- Static Protected Attributes inherited from DataObject
static $_underscoreCache = []
 

Detailed Description

Class ConfigurableInfo @api

Since
100.0.2

Definition at line 17 of file ConfigurableInfo.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( Context  $context,
ConfigInterface  $config,
array  $data = [] 
)
Parameters
Context$context
ConfigInterface$config
array$data

Definition at line 29 of file ConfigurableInfo.php.

33  {
34  parent::__construct($context, $data);
35  $this->config = $config;
36 
37  if (isset($data['pathPattern'])) {
38  $this->config->setPathPattern($data['pathPattern']);
39  }
40 
41  if (isset($data['methodCode'])) {
42  $this->config->setMethodCode($data['methodCode']);
43  }
44  }
$config
Definition: fraud_order.php:17

Member Function Documentation

◆ _prepareSpecificInformation()

_prepareSpecificInformation (   $transport = null)
protected

Prepare payment information

Parameters
\Magento\Framework\DataObject | array | null$transport
Returns
\Magento\Framework\DataObject

Definition at line 52 of file ConfigurableInfo.php.

53  {
54  $transport = parent::_prepareSpecificInformation($transport);
55  $payment = $this->getInfo();
56  $storedFields = explode(',', (string)$this->config->getValue('paymentInfoKeys'));
57  if ($this->getIsSecureMode()) {
58  $storedFields = array_diff(
59  $storedFields,
60  explode(',', (string)$this->config->getValue('privateInfoKeys'))
61  );
62  }
63 
64  foreach ($storedFields as $field) {
65  if ($payment->getAdditionalInformation($field) !== null) {
66  $this->setDataToTransfer(
67  $transport,
68  $field,
69  $payment->getAdditionalInformation($field)
70  );
71  }
72  }
73 
74  return $transport;
75  }
$payment
Definition: order.php:17
setDataToTransfer(\Magento\Framework\DataObject $transport, $field, $value)

◆ getLabel()

getLabel (   $field)
protected

Returns label

Parameters
string$field
Returns
string | Phrase

Definition at line 105 of file ConfigurableInfo.php.

106  {
107  return $field;
108  }

◆ getValueView()

getValueView (   $field,
  $value 
)
protected

Returns value view

Parameters
string$field
string$value
Returns
string | Phrase @SuppressWarnings(PHPMD.UnusedFormalParameter)

Definition at line 118 of file ConfigurableInfo.php.

119  {
120  return $value;
121  }
$value
Definition: gender.phtml:16

◆ setDataToTransfer()

setDataToTransfer ( \Magento\Framework\DataObject  $transport,
  $field,
  $value 
)
protected

Sets data to transport

Parameters
\Magento\Framework\DataObject$transport
string$field
string$value
Returns
void

Definition at line 85 of file ConfigurableInfo.php.

89  {
90  $transport->setData(
91  (string)$this->getLabel($field),
92  (string)$this->getValueView(
93  $field,
94  $value
95  )
96  );
97  }
$value
Definition: gender.phtml:16

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