File tree Expand file tree Collapse file tree 6 files changed +63
-13
lines changed
src/com/magento/idea/magento2plugin/actions/generation Expand file tree Collapse file tree 6 files changed +63
-13
lines changed Original file line number Diff line number Diff line change
1
+ #if (${CLI_COMMAND_NAME})
2
+ <type name="Magento\Framework\Console\CommandListInterface">
3
+ #end
4
+ <arguments>
5
+ <argument name="commands" xsi:type="array">
6
+ <item name="${CLI_COMMAND_DI_NAME}" xsi:type="object">${CLI_COMMAND_CLASS}</item>
7
+ </argument>
8
+ </arguments>
9
+ #if (${CLI_COMMAND_NAME})
10
+ </type>
11
+ #end
Original file line number Diff line number Diff line change
1
+ <!--
2
+ /*
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ -->
7
+ < html >
8
+ < body >
9
+ < table width ="100% " border ="0 " cellpadding ="5 " cellspacing ="0 " style ="border-collapse: collapse ">
10
+ < tr >
11
+ < td >
12
+ < font face ="verdana " size ="-1 ">
13
+ Each CLI Command must be register in the related module di.xml.
14
+ Declare your Command class in Magento\Framework\Console\CommandListInterface and configure the command name using dependency injection
15
+ </ font >
16
+ </ td >
17
+ </ tr >
18
+ < tr >
19
+ < td >
20
+ < font face ="verdana " size ="-1 ">
21
+ < a href ="https://devdocs.magento.com/guides/v2.3/extension-dev-guide/cli-cmds/cli-howto.html "> Create a new CLI Command in Magento.</ a >
22
+ </ font >
23
+ </ td >
24
+ </ tr >
25
+ </ table >
26
+ < table width ="100% " border ="0 " cellpadding ="5 " cellspacing ="0 " style ="border-collapse: collapse ">
27
+ < tr >
28
+ < td colspan ="3 "> < font face ="verdana " size ="-1 "> Predefined variables explanation:</ font > </ td >
29
+ </ tr >
30
+ < tr >
31
+ < td valign ="top "> < nobr > < font face ="verdana " size ="-2 "> < b > ${CLI_COMMAND_DI_NAME}</ b > </ font > </ nobr > </ td >
32
+ < td width ="10 "> </ td >
33
+ < td width ="100% " valign ="top "> < font face ="verdana " size ="-1 "> A CLI Command name used for DI to the CommandListInterface.</ font > </ td >
34
+ </ tr >
35
+ < tr >
36
+ < td valign ="top "> < nobr > < font face ="verdana " size ="-2 "> < b > ${CLI_COMMAND_CLASS}</ b > </ font > </ nobr > </ td >
37
+ < td width ="10 "> </ td >
38
+ < td width ="100% " valign ="top "> < font face ="verdana " size ="-1 "> A class of the CLI Command.</ font > </ td >
39
+ </ tr >
40
+ </ table >
41
+ </ body >
42
+ </ html >
Original file line number Diff line number Diff line change 2
2
#parse("PHP File Header.php")
3
3
4
4
#if (${NAMESPACE})
5
-
6
5
namespace ${NAMESPACE};
7
-
8
6
#end
9
7
10
8
use Symfony\Component\Console\Command\Command;
Original file line number Diff line number Diff line change 10
10
import com .intellij .psi .PsiDirectory ;
11
11
import com .magento .idea .magento2plugin .MagentoIcons ;
12
12
import com .magento .idea .magento2plugin .actions .generation .dialog .NewCronjobDialog ;
13
- import com .magento .idea .magento2plugin .indexes .CronGroupIndex ;
14
13
import org .jetbrains .annotations .NotNull ;
15
14
16
15
public class NewCronjobAction extends AnAction {
Original file line number Diff line number Diff line change 49
49
<text value =" " />
50
50
</properties >
51
51
</component >
52
- <component id =" 9e289" class =" javax.swing.JTextField" binding =" cliCommandDescriptionField" >
53
- <constraints >
54
- <grid row =" 3" column =" 1" row-span =" 1" col-span =" 1" vsize-policy =" 0" hsize-policy =" 6" anchor =" 8" fill =" 1" indent =" 0" use-parent-layout =" false" >
55
- <preferred-size width =" 150" height =" -1" />
56
- </grid >
57
- </constraints >
58
- <properties />
59
- </component >
60
52
<component id =" 86880" class =" javax.swing.JLabel" >
61
53
<constraints >
62
54
<grid row =" 0" column =" 0" row-span =" 1" col-span =" 1" vsize-policy =" 0" hsize-policy =" 0" anchor =" 8" fill =" 0" indent =" 0" use-parent-layout =" false" />
89
81
<grid row =" 3" column =" 0" row-span =" 1" col-span =" 1" vsize-policy =" 0" hsize-policy =" 0" anchor =" 8" fill =" 0" indent =" 0" use-parent-layout =" false" />
90
82
</constraints >
91
83
<properties >
92
- <labelFor value =" 9e289 " />
84
+ <labelFor value =" d786e " />
93
85
<text resource-bundle =" magento2/common" key =" common.cli.cli.description" />
94
86
</properties >
95
87
</component >
129
121
</component >
130
122
</children >
131
123
</grid >
124
+ <component id =" d786e" class =" javax.swing.JTextArea" binding =" cliCommandDescriptionField" >
125
+ <constraints >
126
+ <grid row =" 3" column =" 1" row-span =" 1" col-span =" 1" vsize-policy =" 6" hsize-policy =" 6" anchor =" 0" fill =" 3" indent =" 0" use-parent-layout =" false" >
127
+ <preferred-size width =" 150" height =" 50" />
128
+ </grid >
129
+ </constraints >
130
+ <properties />
131
+ </component >
132
132
</children >
133
133
</grid >
134
134
</children >
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public class NewCLICommandDialog extends AbstractDialog {
21
21
private JTextField cliCommandClassNameField ;
22
22
private JTextField cliCommandParentDirectoryField ;
23
23
private JTextField cliCommandNameField ;
24
- private JTextField cliCommandDescriptionField ;
24
+ private JTextArea cliCommandDescriptionField ;
25
25
private JButton buttonCancel ;
26
26
private JButton buttonOK ;
27
27
You can’t perform that action at this time.
0 commit comments