Skip to content

Commit 4e2e13c

Browse files
committed
Fixed code
1 parent 55147af commit 4e2e13c

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

resources/fileTemplates/internal/Magento Entity New Action Controller Class.php.ft

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class ${CLASS_NAME} extends ${EXTENDS} implements ${IMPLEMENTS}
2828
public function execute()
2929
{
3030
/** @var ${RESULT_PAGE} $resultPage */
31-
$resultPage = $this->resultFactory->create(${RESULT_FACTORY}::TYPE_FORWARD);
31+
$resultPage = $this->resultFactory->create(${RESULT_FACTORY}::TYPE_PAGE);
3232
$resultPage->setActiveMenu('${MENU_IDENTIFIER}');
3333
$resultPage->getConfig()->getTitle()->prepend(__('New ${ENTITY_NAME}'));
3434

src/com/magento/idea/magento2plugin/actions/generation/generator/NewActionEntityControllerFileGenerator.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,9 @@ protected void fillAttributes(final @NotNull Properties attributes) {
7777
addProperty(attributes, "IMPLEMENTS", HttpMethod.GET.getInterfaceFqn());
7878
attributes.setProperty("ADMIN_RESOURCE", fileData.getAcl());
7979
attributes.setProperty("MENU_IDENTIFIER", fileData.getMenu());
80-
addProperty(attributes, "RESULT_INTERFACE", FrameworkLibraryType.RESULT_INTERFACE.getType());
80+
addProperty(attributes, "RESULT_INTERFACE",
81+
FrameworkLibraryType.RESULT_INTERFACE.getType()
82+
);
8183
addProperty(attributes, "RESULT_FACTORY", FrameworkLibraryType.RESULT_FACTORY.getType());
8284
addProperty(attributes, "RESULT_PAGE", BackendModuleType.RESULT_PAGE.getType());
8385

tests/com/magento/idea/magento2plugin/actions/generation/generator/NewActionEntityGeneratorTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ public void testGenerateNewActionEntityFile() {
3737
newActionEntityControllerFileData,
3838
myFixture.getProject()
3939
);
40-
final PsiFile newActionEntityActionFile = newActionEntityControllerFileGenerator.generate("test");
40+
final PsiFile newActionEntityActionFile =
41+
newActionEntityControllerFileGenerator.generate("test");
4142
final String filePath = this.getFixturePath(NewActionFile.getInstance().getFileName());
4243
final PsiFile expectedFile = myFixture.configureByFile(filePath);
4344

0 commit comments

Comments
 (0)