Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit a43d319

Browse files
author
Steve Johnson
committed
Merge pull request #196 from magento/develop
Merge at end of sprint 23
2 parents 8796e3a + 875c799 commit a43d319

Some content is hidden

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

49 files changed

+1468
-629
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<p>Before you begin, make sure that:</p>
2+
<ol><li>Your system meets the requirements discussed in <a href="{{ site.gdeurl }}install-gde/system-requirements.html">Magento System Requirements</a>.</li>
3+
<li>You completed all prerequisite tasks discussed in <a href="{{ site.gdeurl }}install-gde/prereq/prereq-overview.html">Prerequisites</a>.</li>
4+
<li>You installed Composer and cloned the Magento GitHub repository as discussed in <a href="{{ site.gdeurl }}install-gde/install/composer-clone.html">Install Composer and clone the Magento GitHub repository</a>.</li>
5+
<li>After you log in to the Magento server, switch to the web server user as discussed in <a href="{{ site.gdeurl }}install-gde/install/prepare-install.html#install-update-depend-apache">Switching to the Apache user</a>.</li></ol>
6+
7+
<div class="bs-callout bs-callout-info" id="info">
8+
<span class="glyphicon-class">
9+
<p>You must install Magento from its <code>setup</code> subdirectory.</p></span>
10+
</div>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<p>Magento enables you to enable or disable currently installed modules; in other words, any Magento-provided module or any third-party module you currently have installed.</p>
2+
<p>Certain modules have dependencies on other modules, in which case you might not be able to enable or disable a module because it has dependencies on other modules. </p>
3+
<p>In addition, there might be <em>conflicting</em> modules that cannot both be enabled at the same time.</p>
4+
<p>Examples:</p>
5+
<ul><li>Module A depends on Module B. You cannot disable Module B unless you first disable Module A.</li>
6+
<li>Module A depends on Module B, both of which are disabled. You must enable module B before you can enable module A.</li>
7+
<li>Module A conflicts with Module B. You can disable Module A and Module B, or you can disable either module but you <em>cannot</em> enable Module A and Module B at the same time.</li></ul>
8+
9+
<p>Dependencies and conflicts are declared in the <code>require</code> field in Magento's <code>composer.json</code> file for each module. Conflicts are declared in the <code>conflict</code> field in modules' <code>composer.json</code> files. We use that information to build a dependency graph:</p>
10+
<ul><li><code>A->B</code> means module A depends on module B.</li>
11+
<li>A <em>dependency chain</em> is the path from a module to another one. For example, if module A depends on module B and module B depends on module C, then the dependency chain is <code>A->B->C</code>.</li></ul>
12+
<p>If you attempt to enable or disable a module that depends on other modules, the dependency graph displays in the error message.</p>
13+
<div class="bs-callout bs-callout-info" id="info">
14+
<span class="glyphicon-class">
15+
<p>It's possible that module A's <code>composer.json</code> declares a conflict with module B but not vice versa.</p></span>
16+
</div>
17+
18+
<p><em>Command line <a href="{{ site.gdeurl }}install-gde/install/install-cli-subcommands-enable.html">module enable or disable subcommand</a> only:</em> To force a module to be enabled or disabled regardless of its dependencies, use the optional <code>--force</code> argument.</p>
19+
20+
<div class="bs-callout bs-callout-warning">
21+
<p>Using <code>--force</code> can disable your Magento store and cause problems accessing the Magento Admin.</p>
22+
</div>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<p>First steps:</p>
2+
<ol><li>Log in to the Magento server as, or <a href="{{ site.gdeurl }}install-gde/install/prepare-install.html#install-update-depend-apache">switch to</a>, the web server user.</li>
3+
<li>Change to the following directory:<br>
4+
<pre>cd &lt;your Magento install dir>/setup</pre>
5+
Examples:
6+
<ul><li>Ubuntu: <code>cd /var/www/magento2/setup</code></li>
7+
<li>CentOS: <code>cd /var/www/html/magento2/setup</code></li>
8+
</ul>
9+
</li>
10+
</ol>

common/css/override.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ code {
2424
p.q {
2525
font-size: 15pt;
2626
color: red;
27-
display: none;
27+
/* display: none; */
2828
}

common/images/create_template.png

137 KB
Loading
37.3 KB
Loading

common/images/email-logo-settings.png

46.6 KB
Loading

common/images/insert-variable.png

69.4 KB
Loading
131 KB
Loading
131 KB
Loading

guides/v1.0/architecture/modules/mod_and_areas.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ github_link: architecture/modules/mod_and_areas.md
1111
<h2 id="m2arch-module-areas-overview"> Overview</h2>
1212
Modules define which resources are visible and accessible in an area, as well as an area's behavior.
1313

14-
In Magento there are the following Areas:
14+
In Magento there are the following areas:
1515

1616
* **Magento Admin** (adminhtml)
1717
* **Storefront** (frontend)
@@ -26,7 +26,7 @@ You can enable or disable an area within a module. If this module is enabled, it
2626
<p>No module should depend on another module's area.</p>
2727
</div>
2828

29-
Magento uses areas to efficiently make web service calls, loading only the dependent code for that area. Examples of areas include the frontend (storefront), backend (adminhtml), and webapi (web services).
29+
Magento uses areas to efficiently make web service calls, loading only the dependent code for that area.
3030

3131
The purpose of areas is efficiency. If you are invoking a REST web service call, for example, rather than load up all the code related to generating user HTML pages, there is a separate area (such as /rest) which loads code that knows only how to answer the REST call (and not generate HTML pages using layouts). Each area can have completely different code on how to process URLs and requests.
3232

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
layout: default
3+
group: config-guide
4+
subgroup: Magento configuration files
5+
title: Create or extend configuration types
6+
menu_title: Create or extend configuration types
7+
menu_order: 10
8+
github_link: config-guide/config/config-create.md
9+
---
10+
11+
12+
#### Contents
13+
14+
* <a href="#config-files-extend-create">Extend configuration types</a>
15+
* <a href="#config-files-extend-create-create">Create configuration types</a>
16+
* <a href="#config-files-validate">Validate a configuration type</a>
17+
18+
<h2 id="config-files-extend-create">Extend configuration types</h2>
19+
To extend an existing configuration type, you need only create a configuration file in your module.
20+
21+
For example, to add an event observer, you create `app/etc/events.xml` and declare a new observer.
22+
23+
Because the event configuration type already exists in Magento, the loader and the `events.xsd` validating schema are already present and functional.
24+
25+
Your new `events.xml` is automatically collected from your module and merged with other `events.xml` files for other modules.
26+
27+
<h2 id="config-files-extend-create-create">Create configuration types</h2>
28+
To create new configuration type, you must add at minimum:
29+
30+
* XML configuration files
31+
* XSD validation schema
32+
* A loader
33+
34+
For example, to introduce an adapter for a new search server that enables extensions to configure how its entities are indexed in that server, create:
35+
36+
* A loader.
37+
* An XSD schema.
38+
* Any other classes required for your new type to work.
39+
* An appropriately named configuration file. For example, `search.xml`. This file is read and validated against your schema.
40+
41+
If other modules have a `search.xml` file, they are merged with your file when it loads.
42+
43+
To create a new configuration type, extend the `\Magento\Framework\Config\ReaderInterface`, which is <a href="{{ site.mage2000url }}lib/internal/Magento/Framework/Config/Reader/Filesystem.php" target="_blank">Magento\Framework\Config\Reader\Filesystem</a> to provide the following parameters:
44+
45+
* `$fileResolver`. Implements `\Magento\Framework\Config\FileResolverInterface`. This parameter lists the files containing the configurations of your custom type.
46+
* `$converter`. Implements `\Magento\Framework\Config\ConverterInterface`. This parameter converts the XML into the internal array representation of the configurations.
47+
* `$schemaLocator`. Implements `\Magento\Framework\Config/SchemaLocatorInterface`. This parameter provides the full path to file(s) containing schema(s) for validation of the individual and merged configuration files.</p>
48+
* `$validationState`. Implements `\Magento\Framework\Config\ValidationStateInterface`. This parameter defines whether a configuration file should be validated.
49+
* `$fileName`. Name of a configuration file. The Reader looks for the file names specified by this parameter in modules' `etc` directories.
50+
* `$idAttributes`. Array of note attribute IDs.
51+
52+
For example, to merge the XML files:
53+
54+
array(
55+
'</path/to/node>' => '<identifierAttributeName>',
56+
'</path/to/other/node>' => '<identifierAttributeName>',
57+
}
58+
59+
* `$defaultScope`. Defines the configuration scope to be read by default. The default value for this parameter is global scope.
60+
61+
After you customize `ReaderInterface`, you can use it to collect, merge, validate, and convert the configuration files to an internal array representation.
62+
63+
<h2 id="config-files-validate">Validate a configuration type</h2>
64+
65+
Each configuration file is validated against a schema specific to its configuration type. Example: events, which, in earlier Magento versions, were configured in `config.xml`, are now configured in `events.xml`.
66+
67+
Configuration files can be validated both before (optional) and after any merge of multiple files affecting the same configuration type. Unless the validation rules for the individual and merged files are identical, you should provide two schemas for validating the configuration files:
68+
69+
* Schema to validate an individual
70+
* Schema to validate a merged file
71+
72+
New configuration files must be accompanied by XSD validation schemas. An XML configuration file and its XSD validation file must have the same name.
73+
74+
If you must use two XSD files for a single XML file, the names of the schemas should be recognizable and associated with the XML file.
75+
76+
If you have an `events.xml` file and a first `events.xsd` file, the XSD files for the merged `events.xml` file could be named `events_merged.xsd`.
77+
78+
To ensure validation of an XML file by appropriate XSD file, you must specify the relative path to the XSD file in the XML file. For example:
79+
80+
<config
81+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
82+
xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/ObjectManager/etc/config.xsd">
83+
84+
Your IDE can validate your configuration files at both runtime during development.
85+
86+
#### Related topics
87+
88+
* <a href="{{ site.gdeurl }}config-guide/config/config-php.html">Module configuration files</a>
89+
* <a href="{{ site.gdeurl }}config-guide/config/config-php.html">Magento's deployment configuration, config.php</a>

0 commit comments

Comments
 (0)