Skip to content

Commit

Permalink
Remove whitespace from XML code blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
jellesiderius committed Aug 22, 2023
1 parent 8be34aa commit 16b250f
Show file tree
Hide file tree
Showing 41 changed files with 0 additions and 136 deletions.
2 changes: 0 additions & 2 deletions cache_xml.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ The cache.xml file is located in the `app/etc/` directory of your Magento 2 inst
structure with a root `<config>` element, which contains multiple `<type>` elements representing different cache types.

```xml

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

```xml

<type name="config">
<backend_model>Magento\Framework\Cache\Backend\File</backend_model>
<backend_model>Magento\Framework\App\Cache\StateInterface</backend_model>
Expand Down
9 changes: 0 additions & 9 deletions cron_groups.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ The `cron_groups.xml` file follows a specific structure that consists of several
example of the basic structure:

```xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/cron_groups.xsd">
<group id="default">
Expand Down Expand Up @@ -53,7 +52,6 @@ following attribute:
Example:

```xml

<group id="default">
<!-- Group configurations -->
</group>
Expand All @@ -67,7 +65,6 @@ minutes for generating the cron schedule.
Example:

```xml

<schedule_generate_every>1</schedule_generate_every>
```

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

```xml

<schedule_ahead_for>4</schedule_ahead_for>
```

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

```xml

<schedule_lifetime>2</schedule_lifetime>
```

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

```xml

<history_cleanup_every>10</history_cleanup_every>
```

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

```xml

<history_success_lifetime>60</history_success_lifetime>
```

Expand All @@ -127,7 +120,6 @@ from the history tables.
Example:

```xml

<history_failure_lifetime>600</history_failure_lifetime>
```

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

```xml

<use_separate_process>0</use_separate_process>
```

Expand Down
9 changes: 0 additions & 9 deletions cron_groups_xml.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ The `cron_groups.xml` file follows a specific structure that consists of several
example of the basic structure:

```xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/cron_groups.xsd">
<group id="default">
Expand Down Expand Up @@ -55,7 +54,6 @@ following attribute:
Example:

```xml

<group id="default">
<!-- Group configurations -->
</group>
Expand All @@ -69,7 +67,6 @@ minutes for generating the cron schedule.
Example:

```xml

<schedule_generate_every>1</schedule_generate_every>
```

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

```xml

<schedule_ahead_for>4</schedule_ahead_for>
```

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

```xml

<schedule_lifetime>2</schedule_lifetime>
```

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

```xml

<history_cleanup_every>10</history_cleanup_every>
```

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

```xml

<history_success_lifetime>60</history_success_lifetime>
```

Expand All @@ -129,7 +122,6 @@ from the history tables.
Example:

```xml

<history_failure_lifetime>600</history_failure_lifetime>
```

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

```xml

<use_separate_process>0</use_separate_process>
```

Expand Down
4 changes: 0 additions & 4 deletions db_schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ element can have the following attributes:
Here's an example of defining a table in the `db_schema.xml` file:

```xml

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

```xml

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

```xml

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

```xml

<table name="my_module_table" resource="default" engine="innodb">
<column name="id" dataType="int" nullable="false" comment="ID"/>
<column name="name" dataType="varchar" length="255" nullable="true"/>
Expand Down
4 changes: 0 additions & 4 deletions db_schema_xml.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ element can have the following attributes:
Here's an example of defining a table in the `db_schema.xml` file:

```xml

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

```xml

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

```xml

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

```xml

<table name="my_module_table" resource="default" engine="innodb">
<column name="id" dataType="int" nullable="false" comment="ID"/>
<column name="name" dataType="varchar" length="255" nullable="true"/>
Expand Down
4 changes: 0 additions & 4 deletions di.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ defined. Within a `<type>` element, you can have multiple `<arguments>` and `<pl
Here's an example of the basic structure of a `di.xml` file:

```xml

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

```xml

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

```xml

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

```xml

<type name="Magento\Catalog\Api\ProductRepositoryInterface">
<plugin name="my_plugin" type="MyVendor\MyModule\Plugin\ProductRepositoryPlugin" sortOrder="10" disabled="false"/>
</type>
Expand Down
4 changes: 0 additions & 4 deletions di_xml.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ defined. Within a `<type>` element, you can have multiple `<arguments>` and `<pl
Here's an example of the basic structure of a `di.xml` file:

```xml

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

```xml

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

```xml

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

```xml

<type name="Magento\Catalog\Api\ProductRepositoryInterface">
<plugin name="my_plugin" type="MyVendor\MyModule\Plugin\ProductRepositoryPlugin" sortOrder="10" disabled="false"/>
</type>
Expand Down
6 changes: 0 additions & 6 deletions email_templates_xml.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ The `email_templates.xml` file follows a specific XML structure that defines the
configurations. Here is a basic example of the structure:

```xml

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

```xml

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

```xml

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

```xml

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

```xml

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

```xml

<template id="custom_template" label="Custom Template" file="custom_template.html" type="html" ...>
<attachments>
<attachment type="mimetype" encoding="encoding_type">attachment_content</attachment>
Expand Down
2 changes: 0 additions & 2 deletions events.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ convenient way to define observers using XML configuration. Let's create an obse
1. Create a new XML file `events.xml` in your module's `etc` directory:

```xml

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

```xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="custom_event">
Expand Down
2 changes: 0 additions & 2 deletions events_xml.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ Defining an event in the `events.xml` file is as simple as adding an `event` tag
an example:

```xml

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

```xml

<observer name="catalog_product_save_after_observer" instance="Vendor\Module\Observer\ProductSaveAfter"
method="execute"/>
```
Expand Down
1 change: 0 additions & 1 deletion extension_attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ class CustomAttributePlugin
3. Defining an observer for extension attribute changes:

```xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Event/etc/events.xsd">
<event name="extension_attribute_change_event">
Expand Down
1 change: 0 additions & 1 deletion extension_attributes_xml.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ are defining the attribute. The `code` and `type` define the attribute itself.
Here is an example of adding a custom attribute to the Product entity:

```xml

<extension_attributes for="Magento\Catalog\Api\Data\ProductInterface">
<attribute code="custom_attribute" type="string"/>
</extension_attributes>
Expand Down
Loading

0 comments on commit 16b250f

Please sign in to comment.