Skip to content

[ReadMe] updated readMe file for Contact-CurrensySumbol modules #31638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: 2.4-develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions app/code/Magento/Contact/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,35 @@
# Magento_Contact module

Magento_Contact module provides an implementation of "Contact Us" feature based on sending email message, allows to configure email recipients, email template, etc...

## Installation details
Before installing this module, note that the Magento_Contact is dependent on the Magento_Store module.

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).

## Extensibility

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).

[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.

### Layouts
This module introduces the following layouts in the `view/frontend/layout` directory:
- `contact_index_index`
- `default`

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).

### Public APIs
- `Magento\Contact\Model\MailInterface` - send email from contact form
- `Magento\Contact\Model\ConfigInterface` - "Contact Us" feature configuration

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).

## Additional information

### Configuration
Use the `Stores -> Configuration -> General -> Contacts -> Contact Us -> Enable Contact Us` configuration to enable or disable module functionality.
Use the `Stores -> Configuration -> General -> Contacts -> Email Options -> Send Email To` configuration to select the recipients email.
Use the `Stores -> Configuration -> General -> Contacts -> Email Options -> Email Sender` configuration to select the senders email.
Use the `Stores -> Configuration -> General -> Contacts -> Email Options -> Email Template` configuration to select the emails template.
44 changes: 43 additions & 1 deletion app/code/Magento/Cookie/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
Magento_Cookie module allows enabling and configuring HTTP cookie related settings for the store. These settings are available in the store administration.
# Magento_Cookie module

This module allows enabling and configuring HTTP cookie-related settings for the store.
Allows enabling cookie restriction mode.

## Installation details

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).

## Extensibility

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).

[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.

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.

### Events

The module dispatches the following events:

#### Controller
- `controller_action_nocookies` event in the `\Magento\Cookie\Controller\Index\NoCookies::execute()` method. Parameters:
- `action` is a `$this` object (`\Magento\Cookie\Controller\Index\NoCookies` class)
- `redirect` is a `DataObject` (`\Magento\Framework\DataObject()`)

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).

### Layouts
This module introduces the following layouts in the `view/frontend/layout` and `view/adminhtml/layout` directories:
- `default`

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).

## Additional information

### Configuration

Use the `Stores -> Configuration -> General -> Web -> Default Cookie Settings -> Cookie Restriction Mode` configuration to enable or disable Cookie Restriction Mode.
Use the `Stores -> Configuration -> General -> Web -> Default Cookie Settings -> Cookie Lifetime` configuration to set Cookie Lifetime.
Use the `Stores -> Configuration -> General -> Web -> Default Cookie Settings -> Cookie Path` configuration to set Cookie Path.
Use the `Stores -> Configuration -> General -> Web -> Default Cookie Settings -> Cookie Domain` configuration to set Cookie Domain.
Use the `Stores -> Configuration -> General -> Web -> Default Cookie Settings -> Use HTTP Only` configuration to enable or disable use Http only.
38 changes: 36 additions & 2 deletions app/code/Magento/Cron/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,36 @@
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.
This module also allows administrators to tune cron options in Magento Admin.
# Magento_Cron module

This module enables scheduling of cron jobs.
Other modules can add cron jobs by including crontab.xml in their `etc` directory.
This module also allows administrators to tune cron options in Magento Admin.

## Installation

The Magento_Cron module is one of the base Magento 2 modules. You cannot disable or uninstall this module.

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).

## Additional information

### Configure and run cron
To setup cron jobs see: [Set up cron jobs](https://devdocs.magento.com/cloud/configure/setup-cron-jobs.html).
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).

### Create custom cron jobs
Extension developers can interact with the Magento_Cron module to create custom cron jobs and cron groups.
1. Create a class to run cron:
- create directory <module_dir>/Cron
- create class file in that directory
2. Create a `crontab.xml` in the <module_dir>/etc.

For more information about creating custom cron jobs, see:
[Custom cron job and cron group reference](https://devdocs.magento.com/guides/v2.4/config-guide/cron/custom-cron-ref.html)
[Configure custom cron job and cron group](https://devdocs.magento.com/guides/v2.4/config-guide/cron/custom-cron-tut.html).

### Logging
By default, the cron information can be found at <install_directory>/var/log/cron.log

### Console commands
- `bin/magento cron:install [--force]` - create the Magento crontab
- `bin/magento cron:remove [--force]` - remove the Magento crontab
- `bin/magento cron:run [--group="<cron group name>"]` - run cron jobs
46 changes: 46 additions & 0 deletions app/code/Magento/Csp/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,48 @@
# Magento_Csp module

Magento_Csp implements Content Security Policies for Magento. Allows CSP configuration for Merchants,
provides a way for extension and theme developers to configure CSP headers for their extensions.

## Installation details

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).

## Extensibility

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).

[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.

## Additional information

### Configuration
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)

#### Select CSP mode
CSP can work in two modes:

- `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.
- `restrict` mode - In this mode, Magento acts on any policy violations.

You can set the CSP mode in a custom module by editing the module’s etc/config.xml file.
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.
To enable report-only mode, set the values to 1.

#### Types of CSP policies
[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)

#### Add domains to whitelist
1. Create `csp_whitelist.xml` in `<module_dir>/etc`.
2. Add domains for a policy (like `script-src`, `style-src`, `font-src` and others).
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)

#### Whitelist an inline script or style
Stores that have unsafe-inline disabled for style-src and script-src (default for Magento 2.4) inline scripts and styles must be whitelisted.
You must use Magento\Framework\View\Helper\SecureHtmlRenderer, which is available as a $secureRenderer variable in the .phtml templates to achieve this.

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)

#### Page specific Content-Security-Policies
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

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)
51 changes: 41 additions & 10 deletions app/code/Magento/CurrencySymbol/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,46 @@
# CurrencySymbol
# Magento_CurrencySymbol module

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

## Controllers
## Installation

### Currency Controllers
***CurrencySymbol\Controller\Adminhtml\System\Currency\FetchRates.php*** gets a specified currency conversion rate.
Supports all defined currencies in the system.
***CurrencySymbol\Controller\Adminhtml\System\Currency\SaveRates.php*** saves rates for defined currencies.
Before installing this module, note that the Magento_CurrencySymbol is dependent on the Magento_Widget module.

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).

## Extensibility

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).

[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.

### Events
The module dispatches the following events:
- `admin_system_config_changed_section_currency_before_reinit` event in the `\Magento\CurrencySymbol\Model\System\Currencysymbol::setCurrencySymbolsData` method. Parameters:
- `website` website id (`string|null` type)
- `website` store id (`string|null` type)
- `admin_system_config_changed_section_currency` event in the `\Magento\CurrencySymbol\Model\System\Currencysymbol::setCurrencySymbolsData` method. Parameters:
- `website` website id (`string|null` type)
- `website` store id (`string|null` type)

### Currency Symbol Controllers
***CurrencySymbol\Controller\Adminhtml\System\Currencysymbol\Reset.php*** resets all custom currency symbols.
***CurrencySymbol\Controller\Adminhtml\System\Currencysymbol\Save.php*** creates custom currency symbols.
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).

### Layouts
This module introduces the following layouts in the `view/adminhtml/layout` directory:
- `adminhtml_system_currency_index`
- `adminhtml_system_currencysymbol_index`

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).

## Additional information

### Controllers

#### Currency Controllers
- `CurrencySymbol\Controller\Adminhtml\System\Currency\FetchRates.php` - gets a specified currency conversion rate.
Supports all defined currencies in the system.
- `CurrencySymbol\Controller\Adminhtml\System\Currency\SaveRates.php` - saves rates for defined currencies.

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