Skip to content

Commit 5516798

Browse files
author
Vitaliy
authored
Merge branch '4.3.0-develop' into mainline-eav-attr-code-genearators
2 parents 5af5127 + 7869627 commit 5516798

18 files changed

+516
-0
lines changed

resources/META-INF/plugin.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,11 @@
6868
<action id="MagentoCreateExtensionAttributesFile" class="com.magento.idea.magento2plugin.actions.context.xml.NewExtensionAttributesXmlAction"/>
6969
<action id="MagentoCreateWidgetFile" class="com.magento.idea.magento2plugin.actions.context.xml.NewWidgetXmlAction"/>
7070
<action id="MagentoCreateMviewFile" class="com.magento.idea.magento2plugin.actions.context.xml.NewMviewXmlAction"/>
71+
<action id="MagentoCreateIndexerFile" class="com.magento.idea.magento2plugin.actions.context.xml.NewIndexerXmlAction"/>
72+
<action id="MagentoCreateViewFile" class="com.magento.idea.magento2plugin.actions.context.xml.NewViewXmlAction"/>
73+
<action id="MagentoCreateFieldsetFile" class="com.magento.idea.magento2plugin.actions.context.xml.NewFieldsetXmlAction"/>
74+
<action id="MagentoCreateSectionsFile" class="com.magento.idea.magento2plugin.actions.context.xml.NewSectionsXmlAction"/>
75+
<action id="MagentoCreateEmailTemplatesFile" class="com.magento.idea.magento2plugin.actions.context.xml.NewEmailTemplatesXmlAction"/>
7176
<!-- Context dependent actions -->
7277
<separator/>
7378
<add-to-group group-id="NewGroup" anchor="before" relative-to-action="NewXml"/>
@@ -584,6 +589,11 @@
584589
<internalFileTemplate name="Magento Extension Attributes XML"/>
585590
<internalFileTemplate name="Magento Widget XML"/>
586591
<internalFileTemplate name="Magento Mview XML"/>
592+
<internalFileTemplate name="Magento Indexer XML"/>
593+
<internalFileTemplate name="Magento View XML"/>
594+
<internalFileTemplate name="Magento Fieldset XML"/>
595+
<internalFileTemplate name="Magento Sections XML"/>
596+
<internalFileTemplate name="Magento Module Email Templates Xml"/>
587597

588598
<defaultLiveTemplates file="/liveTemplates/MagentoPWA.xml"/>
589599

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
#parse("XML File Header.xml")
3+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="urn:magento:framework:DataObject/etc/fieldset.xsd">
5+
</config>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!--
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<html lang="en">
8+
<body>
9+
<font face="verdana" size="-1">
10+
<p>
11+
The fieldset.xml file configures which the copy fields from quote to order.
12+
The fieldset.xml file is located under etc/fieldset.xml in a given Magento 2 extension.
13+
</p>
14+
<p>
15+
Read more about fieldset.xml in the
16+
<a href="https://devdocs.magento.com/guides/v2.4/ext-best-practices/tutorials/copy-fieldsets.html">DevDocs</a>.
17+
</p>
18+
</font>
19+
</body>
20+
</html>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
#parse("XML File Header.xml")
3+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="urn:magento:framework:Indexer/etc/indexer.xsd">
5+
</config>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<!--
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<html lang="en">
8+
<body>
9+
<font face="verdana" size="-1">
10+
<p>
11+
Indexing is how Magento transforms data such as products and categories, to improve the performance of
12+
your storefront. As data changes, the transformed data must be updated or reindexed. Magento has a very
13+
sophisticated architecture that stores lots of merchant data (including catalog data, prices, users, and stores)
14+
in many database tables. To optimize storefront performance, Magento accumulates data into special tables
15+
using indexers.
16+
</p>
17+
<p>
18+
Read more about indexer.xml in the
19+
<a href="https://devdocs.magento.com/guides/v2.4/extension-dev-guide/indexing.html">DevDocs</a>.
20+
</p>
21+
</font>
22+
</body>
23+
</html>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
#parse("XML File Header.xml")
3+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Customer:etc/sections.xsd">
5+
</config>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<!--
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<html lang="en">
8+
<body>
9+
<font face="verdana" size="-1">
10+
<p>
11+
Specify actions that trigger cache invalidation for private content blocks in a sections.xml configuration file
12+
in the Vendor/ModuleName/etc/frontend directory. Magento invalidates the cache on a POST or PUT request.
13+
</p>
14+
<p>
15+
Read more about sections.xml in the
16+
<a href="https://devdocs.magento.com/guides/v2.4/extension-dev-guide/cache/page-caching/private-content.html">DevDocs</a>.
17+
</p>
18+
</font>
19+
</body>
20+
</html>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
#parse("XML File Header.xml")
3+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="urn:magento:framework:Indexer/etc/view.xsd">
5+
</config>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!--
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<html lang="en">
8+
<body>
9+
<font face="verdana" size="-1">
10+
<p>
11+
The properties of product images used on the storefront are stored in the view.xml configuration file.
12+
The variable properties vars are configured for each module individually, defined by module name.
13+
</p>
14+
</font>
15+
</body>
16+
</html>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* Copyright © Magento, Inc. All rights reserved.
3+
* See COPYING.txt for license details.
4+
*/
5+
6+
package com.magento.idea.magento2plugin.actions.context.xml;
7+
8+
import com.intellij.ide.fileTemplates.actions.AttributesDefaults;
9+
import com.intellij.psi.PsiDirectory;
10+
import com.intellij.psi.PsiFile;
11+
import com.magento.idea.magento2plugin.actions.context.AbstractContextAction;
12+
import com.magento.idea.magento2plugin.magento.files.EmailTemplatesXml;
13+
import com.magento.idea.magento2plugin.magento.packages.ComponentType;
14+
import com.magento.idea.magento2plugin.magento.packages.Package;
15+
import com.magento.idea.magento2plugin.util.magento.GetMagentoModuleUtil;
16+
import org.jetbrains.annotations.NotNull;
17+
18+
public class NewEmailTemplatesXmlAction extends AbstractContextAction {
19+
20+
public static final String ACTION_NAME = "Magento 2 Email Templates File";
21+
public static final String ACTION_DESCRIPTION =
22+
"Create a new Magento 2 email_templates.xml file";
23+
24+
/**
25+
* New email_templates.xml file generation action constructor.
26+
*/
27+
public NewEmailTemplatesXmlAction() {
28+
super(ACTION_NAME, ACTION_DESCRIPTION, new EmailTemplatesXml());
29+
}
30+
31+
@Override
32+
protected boolean isVisible(
33+
final @NotNull GetMagentoModuleUtil.MagentoModuleData moduleData,
34+
final @NotNull PsiDirectory targetDirectory,
35+
final PsiFile targetFile
36+
) {
37+
final PsiDirectory configDir = moduleData.getConfigDir();
38+
39+
if (configDir == null) {
40+
return false;
41+
}
42+
43+
return targetDirectory.getName().equals(Package.moduleBaseAreaDir)
44+
&& targetDirectory.equals(configDir)
45+
&& moduleData.getType().equals(ComponentType.module);
46+
}
47+
48+
49+
@Override
50+
protected AttributesDefaults getProperties(
51+
final @NotNull AttributesDefaults defaults,
52+
final @NotNull GetMagentoModuleUtil.MagentoModuleData moduleData,
53+
final PsiDirectory targetDirectory,
54+
final PsiFile targetFile
55+
) {
56+
return defaults;
57+
}
58+
}

0 commit comments

Comments
 (0)