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

Public Member Functions

 __construct ( $mappings, $translations=array(), $pathSuffix)
 
 setMappings ($mappings)
 
 getMappings ()
 
- Public Member Functions inherited from PathTranslationParser
 __construct ($translations, $pathSuffix)
 
 translatePathMappings ($mappings)
 

Protected Attributes

 $_mappings = array()
 
- Protected Attributes inherited from PathTranslationParser
 $pathPrefixVariants = array('', './')
 
 $pathPrefixTranslations = array()
 
 $pathSuffix
 

Additional Inherited Members

- Protected Member Functions inherited from PathTranslationParser
 createPrefixVariants ($translations)
 

Detailed Description

Definition at line 8 of file MapParser.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $mappings,
  $translations = array(),
  $pathSuffix 
)

Definition at line 12 of file MapParser.php.

13  {
14  parent::__construct($translations, $pathSuffix);
15 
16  $this->setMappings($mappings);
17  }

Member Function Documentation

◆ getMappings()

getMappings ( )

Return the mappings in an array: array( array(source1, target1), array(source2, target2.1), array(source2, target2.2), array(source3, target3), ... )

Returns
array
Exceptions

Implements Parser.

Definition at line 24 of file MapParser.php.

◆ setMappings()

setMappings (   $mappings)

Definition at line 19 of file MapParser.php.

20  {
21  $this->_mappings = $this->translatePathMappings($mappings);
22  }

Field Documentation

◆ $_mappings

$_mappings = array()
protected

Definition at line 10 of file MapParser.php.


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