Skip to content

Commit 5b11d68

Browse files
committed
[ReadMe] updated readMe file for Contact, Cookie, Cron, Csp, CurrensySymbol modules
1 parent 960a51f commit 5b11d68

File tree

5 files changed

+200
-13
lines changed

5 files changed

+200
-13
lines changed

app/code/Magento/Contact/README.md

+34
Original file line numberDiff line numberDiff line change
@@ -1 +1,35 @@
1+
# Magento_Contact module
2+
13
Magento_Contact module provides an implementation of "Contact Us" feature based on sending email message, allows to configure email recipients, email template, etc...
4+
5+
## Installation details
6+
Before installing this module, note that the Magento_Contact is dependent on the Magento_Store module.
7+
8+
For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html).
9+
10+
## Extensibility
11+
12+
Extension developers can interact with the Magento_Contact module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html).
13+
14+
[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Contact module.
15+
16+
### Layouts
17+
This module introduces the following layouts in the `view/frontend/layout` directory:
18+
- `contact_index_index`
19+
- `default`
20+
21+
For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html).
22+
23+
### Public APIs
24+
- `Magento\Contact\Model\MailInterface` - send email from contact form
25+
- `Magento\Contact\Model\ConfigInterface` - "Contact Us" feature configuration
26+
27+
For information about a public API in Magento 2, see [Public interfaces & APIs](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/api-concepts.html).
28+
29+
## Additional information
30+
31+
### Configuration
32+
Use the `Stores -> Configuration -> General -> Contacts -> Contact Us -> Enable Contact Us` configuration to enable or disable module functionality.
33+
Use the `Stores -> Configuration -> General -> Contacts -> Email Options -> Send Email To` configuration to select the recipients email.
34+
Use the `Stores -> Configuration -> General -> Contacts -> Email Options -> Email Sender` configuration to select the senders email.
35+
Use the `Stores -> Configuration -> General -> Contacts -> Email Options -> Email Template` configuration to select the emails template.

app/code/Magento/Cookie/README.md

+43-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,43 @@
1-
Magento_Cookie module allows enabling and configuring HTTP cookie related settings for the store. These settings are available in the store administration.
1+
# Magento_Cookie module
2+
3+
This module allows enabling and configuring HTTP cookie-related settings for the store.
4+
Allows enabling cookie restriction mode.
5+
6+
## Installation details
7+
8+
For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html).
9+
10+
## Extensibility
11+
12+
Extension developers can interact with the Magento_Cookie module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html).
13+
14+
[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Cookie module.
15+
16+
A lot of functionality in the module is on JavaScript, use [mixins](https://devdocs.magento.com/guides/v2.4/javascript-dev-guide/javascript/js_mixins.html) to extend it.
17+
18+
### Events
19+
20+
The module dispatches the following events:
21+
22+
#### Controller
23+
- `controller_action_nocookies` event in the `\Magento\Cookie\Controller\Index\NoCookies::execute()` method. Parameters:
24+
- `action` is a `$this` object (`\Magento\Cookie\Controller\Index\NoCookies` class)
25+
- `redirect` is a `DataObject` (`\Magento\Framework\DataObject()`)
26+
27+
For information about an event in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events).
28+
29+
### Layouts
30+
This module introduces the following layouts in the `view/frontend/layout` and `view/adminhtml/layout` directories:
31+
- `default`
32+
33+
For more information about a layout in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html).
34+
35+
## Additional information
36+
37+
### Configuration
38+
39+
Use the `Stores -> Configuration -> General -> Web -> Default Cookie Settings -> Cookie Restriction Mode` configuration to enable or disable Cookie Restriction Mode.
40+
Use the `Stores -> Configuration -> General -> Web -> Default Cookie Settings -> Cookie Lifetime` configuration to set Cookie Lifetime.
41+
Use the `Stores -> Configuration -> General -> Web -> Default Cookie Settings -> Cookie Path` configuration to set Cookie Path.
42+
Use the `Stores -> Configuration -> General -> Web -> Default Cookie Settings -> Cookie Domain` configuration to set Cookie Domain.
43+
Use the `Stores -> Configuration -> General -> Web -> Default Cookie Settings -> Use HTTP Only` configuration to enable or disable use Http only.

app/code/Magento/Cron/README.md

+36-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,36 @@
1-
Cron is a module that enables scheduling of jobs. Other modules can add cron jobs by including crontab.xml in their etc directory. The command "bin/magento cron:run" should be run periodically to trigger the Cron module to run its scheduled jobs.
2-
This module also allows administrators to tune cron options in Magento Admin.
1+
# Magento_Cron module
2+
3+
This module enables scheduling of cron jobs.
4+
Other modules can add cron jobs by including crontab.xml in their `etc` directory.
5+
This module also allows administrators to tune cron options in Magento Admin.
6+
7+
## Installation
8+
9+
The Magento_Cron module is one of the base Magento 2 modules. You cannot disable or uninstall this module.
10+
11+
For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html).
12+
13+
## Additional information
14+
15+
### Configure and run cron
16+
To setup cron jobs see: [Set up cron jobs](https://devdocs.magento.com/cloud/configure/setup-cron-jobs.html).
17+
To configure and run cron jobs see: [Configure and run cron](https://devdocs.magento.com/guides/v2.4/config-guide/cli/config-cli-subcommands-cron.html).
18+
19+
### Create custom cron jobs
20+
Extension developers can interact with the Magento_Cron module to create custom cron jobs and cron groups.
21+
1. Create a class to run cron:
22+
- create directory <module_dir>/Cron
23+
- create class file in that directory
24+
2. Create a `crontab.xml` in the <module_dir>/etc.
25+
26+
For more information about creating custom cron jobs, see:
27+
[Custom cron job and cron group reference](https://devdocs.magento.com/guides/v2.4/config-guide/cron/custom-cron-ref.html)
28+
[Configure custom cron job and cron group](https://devdocs.magento.com/guides/v2.4/config-guide/cron/custom-cron-tut.html).
29+
30+
### Logging
31+
By default, the cron information can be found at <install_directory>/var/log/cron.log
32+
33+
### Console commands
34+
- `bin/magento cron:install [--force]` - create the Magento crontab
35+
- `bin/magento cron:remove [--force]` - remove the Magento crontab
36+
- `bin/magento cron:run [--group="<cron group name>"]` - run cron jobs

app/code/Magento/Csp/README.md

+46
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,48 @@
1+
# Magento_Csp module
2+
13
Magento_Csp implements Content Security Policies for Magento. Allows CSP configuration for Merchants,
24
provides a way for extension and theme developers to configure CSP headers for their extensions.
5+
6+
## Installation details
7+
8+
For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html).
9+
10+
## Extensibility
11+
12+
Extension developers can interact with the Magento_Contact module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html).
13+
14+
[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Cms module.
15+
16+
## Additional information
17+
18+
### Configuration
19+
For more information about Magento CSP, see [Content Security Policies](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/security/content-security-policies.html#configure-csps-for-your-custom-codeextensiontheme)
20+
21+
#### Select CSP mode
22+
CSP can work in two modes:
23+
24+
- `report-only` mode - In this mode, Magento reports policy violations but does not interfere. This mode is useful for debugging. By default, CSP violations are written to the browser console, but they can be configured to be reported to an endpoint as an HTTP request to collect logs. There are a number of services that will collect, store, and sort your store’s CSP violations reports for you.
25+
- `restrict` mode - In this mode, Magento acts on any policy violations.
26+
27+
You can set the CSP mode in a custom module by editing the module’s etc/config.xml file.
28+
To set the mode to restrict, change the value of the default/csp/mode/admin/report_only and/or the default/csp/mode/storefront/report_only element to 0.
29+
To enable report-only mode, set the values to 1.
30+
31+
#### Types of CSP policies
32+
[List of CSP policy types](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/security/content-security-policies.html#configure-csps-for-your-custom-codeextensiontheme)
33+
34+
#### Add domains to whitelist
35+
1. Create `csp_whitelist.xml` in `<module_dir>/etc`.
36+
2. Add domains for a policy (like `script-src`, `style-src`, `font-src` and others).
37+
For more information, see [Add a domain to whitelist](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/security/content-security-policies.html#add-a-domain-to-the-whitelist)
38+
39+
#### Whitelist an inline script or style
40+
Stores that have unsafe-inline disabled for style-src and script-src (default for Magento 2.4) inline scripts and styles must be whitelisted.
41+
You must use Magento\Framework\View\Helper\SecureHtmlRenderer, which is available as a $secureRenderer variable in the .phtml templates to achieve this.
42+
43+
For more information, see [Whitelist an inline script or style](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/security/content-security-policies.html#whitelist-an-inline-script-or-style)
44+
45+
#### Page specific Content-Security-Policies
46+
Magento can send unique policies for a specific page. To do so, implement Magento\Csp\Api\CspAwareActionInterface in a controller responsible for the page and define the `modifyCsp` method
47+
48+
For more information, see [Page specific Content-Security-Policies](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/security/content-security-policies.html#report-uri-configuration)
+41-10
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,46 @@
1-
# CurrencySymbol
1+
# Magento_CurrencySymbol module
22

3-
**CurrencySymbol** enables the creation of custom currencies and management of currency conversion rates.
3+
This module enables creating custom currencies and managing currency conversion rates.
44

5-
## Controllers
5+
## Installation
66

7-
### Currency Controllers
8-
***CurrencySymbol\Controller\Adminhtml\System\Currency\FetchRates.php*** gets a specified currency conversion rate.
9-
Supports all defined currencies in the system.
10-
***CurrencySymbol\Controller\Adminhtml\System\Currency\SaveRates.php*** saves rates for defined currencies.
7+
Before installing this module, note that the Magento_CurrencySymbol is dependent on the Magento_Widget module.
8+
9+
For information about a module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.4/install-gde/install/cli/install-cli-subcommands-enable.html).
10+
11+
## Extensibility
12+
13+
Extension developers can interact with the Magento_CurrencySymbol module. For more information about the Magento extension mechanism, see [Magento plugins](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/plugins.html).
14+
15+
[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.4/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_CurrencySymbol module.
16+
17+
### Events
18+
The module dispatches the following events:
19+
- `admin_system_config_changed_section_currency_before_reinit` event in the `\Magento\CurrencySymbol\Model\System\Currencysymbol::setCurrencySymbolsData` method. Parameters:
20+
- `website` website id (`string|null` type)
21+
- `website` store id (`string|null` type)
22+
- `admin_system_config_changed_section_currency` event in the `\Magento\CurrencySymbol\Model\System\Currencysymbol::setCurrencySymbolsData` method. Parameters:
23+
- `website` website id (`string|null` type)
24+
- `website` store id (`string|null` type)
1125

12-
### Currency Symbol Controllers
13-
***CurrencySymbol\Controller\Adminhtml\System\Currencysymbol\Reset.php*** resets all custom currency symbols.
14-
***CurrencySymbol\Controller\Adminhtml\System\Currencysymbol\Save.php*** creates custom currency symbols.
26+
For information about an event in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.4/extension-dev-guide/events-and-observers.html#events).
27+
28+
### Layouts
29+
This module introduces the following layouts in the `view/adminhtml/layout` directory:
30+
- `adminhtml_system_currency_index`
31+
- `adminhtml_system_currencysymbol_index`
32+
33+
For more information about a layout in Magento 2, see the [Layout documentation](http://devdocs.magento.com/guides/v2.4/frontend-dev-guide/layouts/layout-overview.html).
34+
35+
## Additional information
36+
37+
### Controllers
38+
39+
#### Currency Controllers
40+
- `CurrencySymbol\Controller\Adminhtml\System\Currency\FetchRates.php` - gets a specified currency conversion rate.
41+
Supports all defined currencies in the system.
42+
- `CurrencySymbol\Controller\Adminhtml\System\Currency\SaveRates.php` - saves rates for defined currencies.
1543

44+
#### Currency Symbol Controllers
45+
- `CurrencySymbol\Controller\Adminhtml\System\Currencysymbol\Reset.php` - resets all custom currency symbols.
46+
- `CurrencySymbol\Controller\Adminhtml\System\Currencysymbol\Save.php` - creates custom currency symbols.

0 commit comments

Comments
 (0)