Skip to content

Commit 86bbb19

Browse files
author
Vasilii Burlacu
committed
Added the short description for the plugin di.xml template
1 parent 3ac6b7a commit 86bbb19

File tree

1 file changed

+49
-2
lines changed

1 file changed

+49
-2
lines changed

resources/fileTemplates/code/Magento Module DI Xml Plugin.xml.html

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,53 @@
55
*/
66
-->
77
<html>
8-
<body>
9-
</body>
8+
<body>
9+
<table width="100%" border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse">
10+
<tr>
11+
<td><font face="verdana" size="-1">
12+
A plugin is a class that modifies the behavior of public class functions by intercepting a function
13+
call and running code before, after, or around that function call. This allows you to substitute or
14+
extend the behavior of original, public methods for any class or interface.
15+
</font><br>
16+
</td>
17+
</tr>
18+
<tr>
19+
<td><font face="verdana" size="-1">
20+
A plugin is declared (registered) for a class in the di.xml file.
21+
</font><br>
22+
</td>
23+
</tr>
24+
<tr>
25+
<td><font face="verdana" size="-1">
26+
<a href="https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html">Read more</a> about Plugins, including when those can be used.
27+
</font><br>
28+
</td>
29+
</tr>
30+
</table>
31+
<table width="100%" border="0" cellpadding="5" cellspacing="0" style="border-collapse: collapse">
32+
<tr>
33+
<td colspan="3"><font face="verdana" size="-1">Predefined variables explanation:</font></td>
34+
</tr>
35+
<tr>
36+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${TYPE}</b></font></nobr></td>
37+
<td width="10">&nbsp;</td>
38+
<td width="100%" valign="top"><font face="verdana" size="-1">A PHP class or interface which the plugin observes.</font></td>
39+
</tr>
40+
<tr>
41+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${NAME}</b></font></nobr></td>
42+
<td width="10">&nbsp;</td>
43+
<td width="100%" valign="top"><font face="verdana" size="-1">An arbitrary plugin name that identifies a plugin. Also used to merge the configurations for the plugin.</font></td>
44+
</tr>
45+
<tr>
46+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${PLUGIN_TYPE}</b></font></nobr></td>
47+
<td width="10">&nbsp;</td>
48+
<td width="100%" valign="top"><font face="verdana" size="-1">The name of a plugin’s class or its virtual type.</font></td>
49+
</tr>
50+
<tr>
51+
<td valign="top"><nobr><font face="verdana" size="-2"><b>${SORT_ORDER}</b></font></nobr></td>
52+
<td width="10">&nbsp;</td>
53+
<td width="100%" valign="top"><font face="verdana" size="-1">The order the plugin is executed when there are multiple plugins calling the same adjusted method.</font></td>
54+
</tr>
55+
</table>
56+
</body>
1057
</html>

0 commit comments

Comments
 (0)