Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2609 from magento-commerce/10-22_integration
10 22 integration
- Loading branch information
Showing
9 changed files
with
177 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
103 changes: 103 additions & 0 deletions
103
src/guides/v2.4/extension-dev-guide/variable-pool/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
--- | ||
group: php-developer-guide | ||
title: Variable Pool | ||
--- | ||
|
||
The variable pool contains pre-defined values you can use inside CMS content. | ||
These values are defined in [`di.xml`] files or created through the Admin interface. | ||
|
||
## Configuration variables | ||
|
||
Configuration variables are values that are set in the Admin area under the **Stores > Settings > Configuration** section. | ||
|
||
The default list of variable paths available to the Variable Insertion Dialog is defined in the `di.xml` file in the [Variable module]. | ||
This list can be extended by adding more entries to the `configPaths` argument for the `Magento\Variable\Model\Source\Variables` class in your module's `di.xml` file. | ||
|
||
**Example:** di.xml file for the Variable module | ||
|
||
```xml | ||
<?xml version="1.0"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> | ||
<type name="Magento\Variable\Model\Config\Structure\AvailableVariables"> | ||
<arguments> | ||
<argument name="configPaths" xsi:type="array"> | ||
<item name="web" xsi:type="array"> | ||
<item name="web/unsecure/base_url" xsi:type="string">1</item> | ||
<item name="web/secure/base_url" xsi:type="string">1</item> | ||
</item> | ||
<item name="trans_email/ident_general" xsi:type="array"> | ||
<item name="trans_email/ident_general/name" xsi:type="string">1</item> | ||
<item name="trans_email/ident_general/email" xsi:type="string">1</item> | ||
</item> | ||
<item name="trans_email/ident_sales" xsi:type="array"> | ||
<item name="trans_email/ident_sales/name" xsi:type="string">1</item> | ||
<item name="trans_email/ident_sales/email" xsi:type="string">1</item> | ||
</item> | ||
<item name="trans_email/ident_support" xsi:type="array"> | ||
<item name="trans_email/ident_support/name" xsi:type="string">1</item> | ||
<item name="trans_email/ident_support/email" xsi:type="string">1</item> | ||
</item> | ||
<item name="trans_email/ident_custom1" xsi:type="array"> | ||
<item name="trans_email/ident_custom1/name" xsi:type="string">1</item> | ||
<item name="trans_email/ident_custom1/email" xsi:type="string">1</item> | ||
</item> | ||
<item name="trans_email/ident_custom2" xsi:type="array"> | ||
<item name="trans_email/ident_custom2/name" xsi:type="string">1</item> | ||
<item name="trans_email/ident_custom2/email" xsi:type="string">1</item> | ||
</item> | ||
<item name="general/store_information" xsi:type="array"> | ||
<item name="general/store_information/name" xsi:type="string">1</item> | ||
<item name="general/store_information/phone" xsi:type="string">1</item> | ||
<item name="general/store_information/hours" xsi:type="string">1</item> | ||
<item name="general/store_information/country_id" xsi:type="string">1</item> | ||
<item name="general/store_information/region_id" xsi:type="string">1</item> | ||
<item name="general/store_information/postcode" xsi:type="string">1</item> | ||
<item name="general/store_information/city" xsi:type="string">1</item> | ||
<item name="general/store_information/street_line1" xsi:type="string">1</item> | ||
<item name="general/store_information/street_line2" xsi:type="string">1</item> | ||
<item name="general/store_information/merchant_vat_number" xsi:type="string">1</item> | ||
</item> | ||
</argument> | ||
</arguments> | ||
</type> | ||
<type name="Magento\Variable\Model\Source\Variables"> | ||
<arguments> | ||
<argument name="configStructure" xsi:type="object">Magento\Variable\Model\Config\StructureVirtual</argument> | ||
</arguments> | ||
</type> | ||
<virtualType name="Magento\Variable\Model\Config\Structure\ReaderVirtual" type="Magento\Config\Model\Config\Structure\Reader"> | ||
<arguments> | ||
<argument name="domDocumentClass" xsi:type="string">Magento\Variable\Model\Config\Structure\Dom</argument> | ||
</arguments> | ||
</virtualType> | ||
<virtualType name="Magento\Variable\Model\Config\StructureDataVirtual" type="Magento\Config\Model\Config\Structure\Data"> | ||
<arguments> | ||
<argument name="cacheId" xsi:type="string">variable_system_configuration_structure</argument> | ||
<argument name="reader" xsi:type="object">Magento\Variable\Model\Config\Structure\ReaderVirtual</argument> | ||
</arguments> | ||
</virtualType> | ||
<virtualType name="Magento\Variable\Model\Config\StructureVirtual" type="Magento\Config\Model\Config\StructureLazy"> | ||
<arguments> | ||
<argument name="structureData" xsi:type="object">Magento\Variable\Model\Config\StructureDataVirtual</argument> | ||
</arguments> | ||
</virtualType> | ||
</config> | ||
``` | ||
|
||
## Custom variables | ||
|
||
Custom variables are values created in the Admin area under **System > Other Settings > Custom Variables**. | ||
These variables have a store view scope level and have all the features available to configuration values. | ||
|
||
Custom Variable entities can also be created in your module's `DataInstall` or `DataUpgrade` classes. | ||
See [Module Lifecycle] for more information. | ||
|
||
[Variable module]: https://github.com/magento/magento2/tree/{{page.guide_version}}/app/code/Magento/Variable/etc | ||
[Module Lifecycle]: {{page.baseurl }}/extension-dev-guide/prepare/lifecycle.html | ||
[`di.xml`]: {{page.baseurl }}/extension-dev-guide/build/di-xml-file.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters