Skip to content

Commit 0266dc8

Browse files
committed
Fix links to Magento 2.3 filesystem
+ For Magento Architecture and Customization Techniques
1 parent c78270a commit 0266dc8

6 files changed

+24
-24
lines changed

1. Magento Architecture and Customization Techniques/2. Describe Magento’s directory structure.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ In addition, you can choose the component root directory to start development. T
3737
>
3838
> -- [Magento DevDocs - About component file structure](https://devdocs.magento.com/guides/v2.2/extension-dev-guide/prepare/prepare_file-str.html)
3939
40-
Class [Magento\Framework\Module\ModuleList\Loader](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/Module/ModuleList/Loader.php#L78) load `etc/module.xml` files and sort modules by sequence.
40+
Class [Magento\Framework\Module\ModuleList\Loader](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/Module/ModuleList/Loader.php#L78) load `etc/module.xml` files and sort modules by sequence.
4141
The sequence use for sorting events, plugins, preferences and layouts.
4242

4343

1. Magento Architecture and Customization Techniques/4. Demonstrate how to use dependency injection.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ Magento loads di.xml files and merges them all together from the following stage
99

1010
### Object manager
1111

12-
Under the hood, the [ObjectManager](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php)
12+
Under the hood, the [ObjectManager](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/ObjectManager/ObjectManager.php)
1313
will use PHP reflection features to look at a class’s __construct type hints/parameters,
1414
automatically instantiate the object for us, and then pass it into the constructor as an argument.
1515

16-
[AbstractFactory](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php) > [\Magento\Framework\ObjectManager\FactoryInterface](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/ObjectManager/FactoryInterface.php)
16+
[AbstractFactory](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php) > [\Magento\Framework\ObjectManager\FactoryInterface](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/ObjectManager/FactoryInterface.php)
1717
and their implementations use to resolve arguments and create new objects.
1818

1919
By default, all objects created via automatic constructor dependency injection are singleton objects,
@@ -26,7 +26,7 @@ if ($isShared) {
2626
$argument = $this->objectManager->create($argumentType);
2727
}
2828
```
29-
[\Magento\Framework\ObjectManager\Factory::resolveArgument()](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php#L143-L147)
29+
[\Magento\Framework\ObjectManager\Factory::resolveArgument()](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php#L143-L147)
3030

3131
### Arguments
3232

1. Magento Architecture and Customization Techniques/5. Demonstrate ability to use plugins.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
There are three types of plugins in magento: around, before and after.
44

55
__Important__: Classes, abstract classes and interfaces that are implementations of or inherit from classes that have plugins will also inherit plugins from the parent class.
6-
For example, if you create a plugin for [\Magento\Catalog\Block\Product\AbstractProduct](https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/Catalog/Block/Product/AbstractProduct.php),
6+
For example, if you create a plugin for [\Magento\Catalog\Block\Product\AbstractProduct](https://github.com/magento/magento2/blob/2.3/app/code/Magento/Catalog/Block/Product/AbstractProduct.php),
77
plugin methods will be called for all child classes, such as \Magento\Catalog\Block\Product\View, \Magento\Catalog\Block\Product\ProductList\Upsell etc.
88

99
### Limitations
@@ -131,9 +131,9 @@ Magento automatically generates `Interceptor` class for the plugin target and st
131131
}
132132
```
133133

134-
[\Magento\Framework\Interception\Interceptor](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/Interception/Interceptor.php):
134+
[\Magento\Framework\Interception\Interceptor](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/Interception/Interceptor.php):
135135

136-
- $pluginList = [\Magento\Framework\Interception\PluginListInterface](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/Interception/PluginListInterface.php)
136+
- $pluginList = [\Magento\Framework\Interception\PluginListInterface](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/Interception/PluginListInterface.php)
137137
- $subjectType = 'MyBeautifulClass'
138138
- `___init` - called in in constructor, pluginList = get from object manager, subjectType = class name
139139
- pluginList->getNext

1. Magento Architecture and Customization Techniques/6. Configure event observers and scheduled jobs.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Example:
4545
```
4646

4747
Observer class should be placed in the <module-root>/Observer directory and implement
48-
[Magento\Framework\Event\ObserverInterface](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/Event/ObserverInterface.php)
48+
[Magento\Framework\Event\ObserverInterface](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/Event/ObserverInterface.php)
4949
interface.
5050

5151
```php
@@ -63,8 +63,8 @@ class MyObserver implements \Magento\Framework\Event\ObserverInterface
6363

6464
### Dispatching events
6565

66-
Events dispatch by [Magento\Framework\Event\Manager](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/Event/Manager.php) class
67-
that implement [Magento\Framework\Event\ManagerInterface](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/Event/ManagerInterface.php) interface:
66+
Events dispatch by [Magento\Framework\Event\Manager](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/Event/Manager.php) class
67+
that implement [Magento\Framework\Event\ManagerInterface](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/Event/ManagerInterface.php) interface:
6868
> dispatch($eventName, array $data = []);
6969
7070
Example:
@@ -144,16 +144,16 @@ generate
144144
check for standalone process
145145
```
146146

147-
[\Magento\Cron\Model\Config\Data](https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/Cron/Model/Config/Data.php) extends [\Magento\Framework\Config\Data](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/Config/Data.php)
148-
- merges [\Magento\Cron\Model\Config\Reader\Db::get](https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/Cron/Model/Config/Reader/Db.php#L51) from Database
147+
[\Magento\Cron\Model\Config\Data](https://github.com/magento/magento2/blob/2.3/app/code/Magento/Cron/Model/Config/Data.php) extends [\Magento\Framework\Config\Data](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/Config/Data.php)
148+
- merges [\Magento\Cron\Model\Config\Reader\Db::get](https://github.com/magento/magento2/blob/2.3/app/code/Magento/Cron/Model/Config/Reader/Db.php#L51) from Database
149149

150150
Sample DB structure:
151151
```
152152
default/crontab/GROUP/jobs/JOB/schedule/cron_expr = '* * * * *'
153153
default/crontab/GROUP/jobs/JOB/schedule/config_path = 'some/config/path' -- try to read schedule from this config, store view scope
154154
default/crontab/GROUP/jobs/JOB/run/model = 'class::method'
155155
```
156-
DB config usage example: [ProductAlert, system.xml](https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/ProductAlert/etc/adminhtml/system.xml#L38:L45), [ProductAlert, crontab.xml](https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/ProductAlert/etc/crontab.xml), backend model: [Magento\Cron\Model\Config\Backend\Product\Alert](https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/Cron/Model/Config/Backend/Product/Alert.php)
156+
DB config usage example: [ProductAlert, system.xml](https://github.com/magento/magento2/blob/2.3/app/code/Magento/ProductAlert/etc/adminhtml/system.xml#L38:L45), [ProductAlert, crontab.xml](https://github.com/magento/magento2/blob/2.3/app/code/Magento/ProductAlert/etc/crontab.xml), backend model: [Magento\Cron\Model\Config\Backend\Product\Alert](https://github.com/magento/magento2/blob/2.3/app/code/Magento/Cron/Model/Config/Backend/Product/Alert.php)
157157

158158
`bin/magento cron:install` example:
159159
```
@@ -180,7 +180,7 @@ TODO: find out
180180

181181
### Identify the function and proper use of automatically available events
182182

183-
Model events [\Magento\Framework\Model\AbstractModel](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/Model/AbstractModel.php):
183+
Model events [\Magento\Framework\Model\AbstractModel](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/Model/AbstractModel.php):
184184

185185
- `model_load_before`, `{$_eventPrefix}_load_before`
186186
- `model_load_after`, `{$_eventPrefix}_load_after`
@@ -191,18 +191,18 @@ Model events [\Magento\Framework\Model\AbstractModel](https://github.com/magento
191191
- `model_delete_after`, `{$_eventPrefix}_delete_after`
192192
- `model_delete_commit_after`, `{$_eventPrefix}_delete_commit_after`
193193

194-
Flat collection events [\Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/Model/ResourceModel/Db/Collection/AbstractCollection.php):
194+
Flat collection events [\Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/Model/ResourceModel/Db/Collection/AbstractCollection.php):
195195

196196
- `core_collection_abstract_load_before`, `{_eventPrefix}_load_before`
197197
- `core_collection_abstract_load_after`, `{_eventPrefix}_load_after`
198198

199199
only if `_eventPrefix` and `_eventObject` defined: `{prefix}_load_before`, `{prefix}_load_after`
200200

201-
EAV collection events [\Magento\Eav\Model\Entity\Collection\AbstractCollection](https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php):
201+
EAV collection events [\Magento\Eav\Model\Entity\Collection\AbstractCollection](https://github.com/magento/magento2/blob/2.3/app/code/Magento/Eav/Model/Entity/Collection/AbstractCollection.php):
202202

203203
- eav_collection_abstract_load_before
204204

205-
[\Magento\Framework\Model\AbstractModel](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/Model/AbstractModel.php):
205+
[\Magento\Framework\Model\AbstractModel](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/Model/AbstractModel.php):
206206

207207
- _eventObject = 'object'
208208
- _eventPrefix = 'core_abstract', e.g. 'catalog_category'

1. Magento Architecture and Customization Techniques/7. Utilize the CLI.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ class ExampleCommand extends \Symfony\Component\Console\Command\Command
9797
}
9898
```
9999

100-
- Declare your command in [\Magento\Framework\Console\CommandListInterface](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/Console/CommandListInterface.php) using dependency injection ({module}/etc/di.xml).
101-
See also CommandListInterface implementation: [\Magento\Framework\Console\CommandList](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/Console/CommandList.php)
100+
- Declare your command in [\Magento\Framework\Console\CommandListInterface](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/Console/CommandListInterface.php) using dependency injection ({module}/etc/di.xml).
101+
See also CommandListInterface implementation: [\Magento\Framework\Console\CommandList](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/Console/CommandList.php)
102102

103103
{module}/etc/di.xml:
104104
```xml

1. Magento Architecture and Customization Techniques/8. Demonstrate the ability to manage the cache.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,14 @@ Sessions and caching data should never be stored in one database in Redis. In th
127127
### Describe how to clear the cache programmatically.
128128

129129
To clear the cache programmatically you neeed to call next the methods:
130-
- [\Magento\Framework\App\CacheInterface::remove($identifier)](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/App/CacheInterface.php#L48) - remove cached data by identifier
131-
- [\Magento\Framework\App\CacheInterface::clean($tags = [])](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/App/CacheInterface.php#L56) - clean cached data by specific tag
130+
- [\Magento\Framework\App\CacheInterface::remove($identifier)](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/App/CacheInterface.php#L48) - remove cached data by identifier
131+
- [\Magento\Framework\App\CacheInterface::clean($tags = [])](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/App/CacheInterface.php#L56) - clean cached data by specific tag
132132

133133
##### What mechanisms are available for clearing all or part of the cache?
134134

135135
Dispatch a `clean_cache_by_tags` event with parameter of the object you want to clear from the cache.
136136

137-
Example: [\Magento\Framework\Model\AbstractModel](https://github.com/magento/magento2/blob/2.2-develop/lib/internal/Magento/Framework/Model/AbstractModel.php#L817) (afterSave, afterDelete methods)
137+
Example: [\Magento\Framework\Model\AbstractModel](https://github.com/magento/magento2/blob/2.3/lib/internal/Magento/Framework/Model/AbstractModel.php#L817) (afterSave, afterDelete methods)
138138

139139
```php
140140
<?php
@@ -159,8 +159,8 @@ public function cleanModelCache()
159159
```
160160

161161
Default `clean_cache_by_tags` event observers are:
162-
- [Magento\PageCache\Observer\FlushCacheByTags](https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/PageCache/Observer/FlushCacheByTags.php#L57) - if Built-In caching is enabled
163-
- [Magento\CacheInvalidate\Observer\InvalidateVarnishObserver](https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/CacheInvalidate/Observer/InvalidateVarnishObserver.php#L50)- if Varnish caching is enabled
162+
- [Magento\PageCache\Observer\FlushCacheByTags](https://github.com/magento/magento2/blob/2.3/app/code/Magento/PageCache/Observer/FlushCacheByTags.php#L57) - if Built-In caching is enabled
163+
- [Magento\CacheInvalidate\Observer\InvalidateVarnishObserver](https://github.com/magento/magento2/blob/2.3/app/code/Magento/CacheInvalidate/Observer/InvalidateVarnishObserver.php#L50)- if Varnish caching is enabled
164164

165165
###### Links
166166
- [Magento DevDocs - Magento cache overview](https://devdocs.magento.com/guides/v2.2/frontend-dev-guide/cache_for_frontdevs.html)

0 commit comments

Comments
 (0)