Skip to content

Commit 16b250f

Browse files
committed
Remove whitespace from XML code blocks
1 parent 8be34aa commit 16b250f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+0
-136
lines changed

cache_xml.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ The cache.xml file is located in the `app/etc/` directory of your Magento 2 inst
1818
structure with a root `<config>` element, which contains multiple `<type>` elements representing different cache types.
1919

2020
```xml
21-
2221
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2322
xsi:noNamespaceSchemaLocation="urn:magento:framework:Cache/etc/cache.xsd">
2423
<type name="cache_type1"/>
@@ -39,7 +38,6 @@ the corresponding `<type>` element. These child elements define various properti
3938
### Example: Configuring the `config` Cache Type
4039

4140
```xml
42-
4341
<type name="config">
4442
<backend_model>Magento\Framework\Cache\Backend\File</backend_model>
4543
<backend_model>Magento\Framework\App\Cache\StateInterface</backend_model>

cron_groups.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ The `cron_groups.xml` file follows a specific structure that consists of several
2020
example of the basic structure:
2121

2222
```xml
23-
2423
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2524
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/cron_groups.xsd">
2625
<group id="default">
@@ -53,7 +52,6 @@ following attribute:
5352
Example:
5453

5554
```xml
56-
5755
<group id="default">
5856
<!-- Group configurations -->
5957
</group>
@@ -67,7 +65,6 @@ minutes for generating the cron schedule.
6765
Example:
6866

6967
```xml
70-
7168
<schedule_generate_every>1</schedule_generate_every>
7269
```
7370

@@ -79,7 +76,6 @@ is generated. It helps in ensuring that scheduled tasks are executed on time by
7976
Example:
8077

8178
```xml
82-
8379
<schedule_ahead_for>4</schedule_ahead_for>
8480
```
8581

@@ -91,7 +87,6 @@ this time, the schedule entry for the cron job will be removed from the schedule
9187
Example:
9288

9389
```xml
94-
9590
<schedule_lifetime>2</schedule_lifetime>
9691
```
9792

@@ -103,7 +98,6 @@ minutes for cleaning up the history of executed cron jobs.
10398
Example:
10499

105100
```xml
106-
107101
<history_cleanup_every>10</history_cleanup_every>
108102
```
109103

@@ -115,7 +109,6 @@ removed from the history tables.
115109
Example:
116110

117111
```xml
118-
119112
<history_success_lifetime>60</history_success_lifetime>
120113
```
121114

@@ -127,7 +120,6 @@ from the history tables.
127120
Example:
128121

129122
```xml
130-
131123
<history_failure_lifetime>600</history_failure_lifetime>
132124
```
133125

@@ -139,7 +131,6 @@ separate process. It accepts a boolean value: `0` for false and `1` for true.
139131
Example:
140132

141133
```xml
142-
143134
<use_separate_process>0</use_separate_process>
144135
```
145136

cron_groups_xml.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ The `cron_groups.xml` file follows a specific structure that consists of several
2222
example of the basic structure:
2323

2424
```xml
25-
2625
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2726
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/cron_groups.xsd">
2827
<group id="default">
@@ -55,7 +54,6 @@ following attribute:
5554
Example:
5655

5756
```xml
58-
5957
<group id="default">
6058
<!-- Group configurations -->
6159
</group>
@@ -69,7 +67,6 @@ minutes for generating the cron schedule.
6967
Example:
7068

7169
```xml
72-
7370
<schedule_generate_every>1</schedule_generate_every>
7471
```
7572

@@ -81,7 +78,6 @@ is generated. It helps in ensuring that scheduled tasks are executed on time by
8178
Example:
8279

8380
```xml
84-
8581
<schedule_ahead_for>4</schedule_ahead_for>
8682
```
8783

@@ -93,7 +89,6 @@ this time, the schedule entry for the cron job will be removed from the schedule
9389
Example:
9490

9591
```xml
96-
9792
<schedule_lifetime>2</schedule_lifetime>
9893
```
9994

@@ -105,7 +100,6 @@ minutes for cleaning up the history of executed cron jobs.
105100
Example:
106101

107102
```xml
108-
109103
<history_cleanup_every>10</history_cleanup_every>
110104
```
111105

@@ -117,7 +111,6 @@ removed from the history tables.
117111
Example:
118112

119113
```xml
120-
121114
<history_success_lifetime>60</history_success_lifetime>
122115
```
123116

@@ -129,7 +122,6 @@ from the history tables.
129122
Example:
130123

131124
```xml
132-
133125
<history_failure_lifetime>600</history_failure_lifetime>
134126
```
135127

@@ -141,7 +133,6 @@ separate process. It accepts a boolean value: `0` for false and `1` for true.
141133
Example:
142134

143135
```xml
144-
145136
<use_separate_process>0</use_separate_process>
146137
```
147138

db_schema.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ element can have the following attributes:
3535
Here's an example of defining a table in the `db_schema.xml` file:
3636

3737
```xml
38-
3938
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4039
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
4140
<table name="my_module_table" resource="default" engine="innodb">
@@ -58,7 +57,6 @@ attributes:
5857
Here's an example of defining columns within a table:
5958

6059
```xml
61-
6260
<table name="my_module_table" resource="default" engine="innodb">
6361
<column name="id" dataType="int" nullable="false" comment="ID"/>
6462
<column name="name" dataType="varchar" length="255" nullable="true"/>
@@ -79,7 +77,6 @@ the following attributes:
7977
Here's an example of defining an index within a table:
8078

8179
```xml
82-
8380
<table name="my_module_table" resource="default" engine="innodb">
8481
<column name="id" dataType="int" nullable="false" comment="ID"/>
8582
<column name="name" dataType="varchar" length="255" nullable="true"/>
@@ -106,7 +103,6 @@ The `constraint` element can have the following attributes:
106103
Here's an example of defining a foreign key constraint within a table:
107104

108105
```xml
109-
110106
<table name="my_module_table" resource="default" engine="innodb">
111107
<column name="id" dataType="int" nullable="false" comment="ID"/>
112108
<column name="name" dataType="varchar" length="255" nullable="true"/>

db_schema_xml.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ element can have the following attributes:
3737
Here's an example of defining a table in the `db_schema.xml` file:
3838

3939
```xml
40-
4140
<schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4241
xsi:noNamespaceSchemaLocation="urn:magento:framework:Setup/Declaration/Schema/etc/schema.xsd">
4342
<table name="my_module_table" resource="default" engine="innodb">
@@ -60,7 +59,6 @@ attributes:
6059
Here's an example of defining columns within a table:
6160

6261
```xml
63-
6462
<table name="my_module_table" resource="default" engine="innodb">
6563
<column name="id" dataType="int" nullable="false" comment="ID"/>
6664
<column name="name" dataType="varchar" length="255" nullable="true"/>
@@ -81,7 +79,6 @@ the following attributes:
8179
Here's an example of defining an index within a table:
8280

8381
```xml
84-
8582
<table name="my_module_table" resource="default" engine="innodb">
8683
<column name="id" dataType="int" nullable="false" comment="ID"/>
8784
<column name="name" dataType="varchar" length="255" nullable="true"/>
@@ -108,7 +105,6 @@ The `constraint` element can have the following attributes:
108105
Here's an example of defining a foreign key constraint within a table:
109106

110107
```xml
111-
112108
<table name="my_module_table" resource="default" engine="innodb">
113109
<column name="id" dataType="int" nullable="false" comment="ID"/>
114110
<column name="name" dataType="varchar" length="255" nullable="true"/>

di.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ defined. Within a `<type>` element, you can have multiple `<arguments>` and `<pl
2424
Here's an example of the basic structure of a `di.xml` file:
2525

2626
```xml
27-
2827
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2928
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
3029
<type name="{Class/Interface}">
@@ -45,7 +44,6 @@ For example, if we want to configure dependencies for the `Magento\Catalog\Api\P
4544
the `<type>` element would look like this:
4645

4746
```xml
48-
4947
<type name="Magento\Catalog\Api\ProductRepositoryInterface">
5048
<!-- Define dependencies here -->
5149
</type>
@@ -60,7 +58,6 @@ Here's an example of how to define constructor arguments for the `Magento\Catalo
6058
interface:
6159

6260
```xml
63-
6461
<type name="Magento\Catalog\Api\ProductRepositoryInterface">
6562
<arguments>
6663
<argument xsi:type="object" name="productFactory">Magento\Catalog\Model\ProductFactory</argument>
@@ -84,7 +81,6 @@ implements the plugin), and the name of the method you want to intercept.
8481
Here's an example of how to define a plugin for the `Magento\Catalog\Api\ProductRepositoryInterface` interface:
8582

8683
```xml
87-
8884
<type name="Magento\Catalog\Api\ProductRepositoryInterface">
8985
<plugin name="my_plugin" type="MyVendor\MyModule\Plugin\ProductRepositoryPlugin" sortOrder="10" disabled="false"/>
9086
</type>

di_xml.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ defined. Within a `<type>` element, you can have multiple `<arguments>` and `<pl
2626
Here's an example of the basic structure of a `di.xml` file:
2727

2828
```xml
29-
3029
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3130
xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
3231
<type name="{Class/Interface}">
@@ -47,7 +46,6 @@ For example, if we want to configure dependencies for the `Magento\Catalog\Api\P
4746
the `<type>` element would look like this:
4847

4948
```xml
50-
5149
<type name="Magento\Catalog\Api\ProductRepositoryInterface">
5250
<!-- Define dependencies here -->
5351
</type>
@@ -62,7 +60,6 @@ Here's an example of how to define constructor arguments for the `Magento\Catalo
6260
interface:
6361

6462
```xml
65-
6663
<type name="Magento\Catalog\Api\ProductRepositoryInterface">
6764
<arguments>
6865
<argument xsi:type="object" name="productFactory">Magento\Catalog\Model\ProductFactory</argument>
@@ -86,7 +83,6 @@ implements the plugin), and the name of the method you want to intercept.
8683
Here's an example of how to define a plugin for the `Magento\Catalog\Api\ProductRepositoryInterface` interface:
8784

8885
```xml
89-
9086
<type name="Magento\Catalog\Api\ProductRepositoryInterface">
9187
<plugin name="my_plugin" type="MyVendor\MyModule\Plugin\ProductRepositoryPlugin" sortOrder="10" disabled="false"/>
9288
</type>

email_templates_xml.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ The `email_templates.xml` file follows a specific XML structure that defines the
2121
configurations. Here is a basic example of the structure:
2222

2323
```xml
24-
2524
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2625
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Email:etc/email_templates.xsd">
2726
<template id="template_id" label="Template Label" file="file_name.html" type="html">
@@ -51,7 +50,6 @@ To create a new email template, you need to add a `<template>` element inside th
5150
the `email_templates.xml` file. Here's an example:
5251

5352
```xml
54-
5553
<template id="custom_template" label="Custom Template" file="custom_template.html" type="html">
5654
<!-- Variable definitions and CSS styles go here -->
5755
</template>
@@ -69,7 +67,6 @@ To define variables for an email template, you need to add `<variable>` elements
6967
the `<template>` element. Here's an example:
7068

7169
```xml
72-
7370
<template id="custom_template" label="Custom Template" file="custom_template.html" type="html">
7471
<variables>
7572
<variable name="customer_name" xsi:type="string">John Doe</variable>
@@ -97,7 +94,6 @@ attributes. These attributes allow you to specify the subject, sender, and other
9794
Here's an example of configuring an email template:
9895

9996
```xml
100-
10197
<template id="custom_template" label="Custom Template" file="custom_template.html" type="html"
10298
subject="Custom Template Subject" sender_name="Store Name" sender_email="[email protected]">
10399
<!-- Variable definitions, CSS styles, and email content go here -->
@@ -118,7 +114,6 @@ You can add custom headers to the email template by using the `<headers>` elemen
118114
Here's an example:
119115

120116
```xml
121-
122117
<template id="custom_template" label="Custom Template" file="custom_template.html" type="html" ...>
123118
<headers>
124119
<header name="X-Custom-Header">Custom Value</header>
@@ -136,7 +131,6 @@ To include attachments in the email template, you can use the `<attachments>` el
136131
Here's an example:
137132

138133
```xml
139-
140134
<template id="custom_template" label="Custom Template" file="custom_template.html" type="html" ...>
141135
<attachments>
142136
<attachment type="mimetype" encoding="encoding_type">attachment_content</attachment>

events.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ convenient way to define observers using XML configuration. Let's create an obse
6464
1. Create a new XML file `events.xml` in your module's `etc` directory:
6565

6666
```xml
67-
6867
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
6968
xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
7069
<event name="customer_register_success">
@@ -109,7 +108,6 @@ needs. To create a custom event, follow these steps:
109108
1. Create a new XML file `events.xml` in your module's `etc` directory:
110109

111110
```xml
112-
113111
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
114112
xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
115113
<event name="custom_event">

events_xml.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ Defining an event in the `events.xml` file is as simple as adding an `event` tag
4545
an example:
4646

4747
```xml
48-
4948
<event name="catalog_product_save_after">
5049
<observer name="catalog_product_save_after_observer" instance="Vendor\Module\Observer\ProductSaveAfter"
5150
method="execute"/>
@@ -60,7 +59,6 @@ Defining an observer for the event involves adding an `observer` tag inside the
6059
specifies the class that will handle this event, while the `method` attribute defines the method that will be called.
6160

6261
```xml
63-
6462
<observer name="catalog_product_save_after_observer" instance="Vendor\Module\Observer\ProductSaveAfter"
6563
method="execute"/>
6664
```

extension_attributes.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ class CustomAttributePlugin
126126
3. Defining an observer for extension attribute changes:
127127

128128
```xml
129-
130129
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
131130
xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
132131
<event name="extension_attribute_change_event">

extension_attributes_xml.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ are defining the attribute. The `code` and `type` define the attribute itself.
4646
Here is an example of adding a custom attribute to the Product entity:
4747

4848
```xml
49-
5049
<extension_attributes for="Magento\Catalog\Api\Data\ProductInterface">
5150
<attribute code="custom_attribute" type="string"/>
5251
</extension_attributes>

0 commit comments

Comments
 (0)