Skip to content

Commit 19e9274

Browse files
Small fixes
1 parent 766a29f commit 19e9274

File tree

4 files changed

+27
-1
lines changed

4 files changed

+27
-1
lines changed

resources/fileTemplates/internal/Magento UI Component Grid XML.xml.ft

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
</item>
88
</argument>
99
<settings>
10+
<buttons>
11+
<button name="add">
12+
<url path="*/*/new"/>
13+
<class>primary</class>
14+
<label translate="true">Add New</label>
15+
</button>
16+
</buttons>
1017
<spinner>${NAME}_columns</spinner>
1118
<deps>
1219
<dep>${NAME}.${NAME}_data_source</dep>

testData/actions/generation/generator/NewActionEntityGenerator/generateNewActionEntityFile/NewAction.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
<?php
2+
23
namespace Foo\Bar\Controller\Adminhtml\Company;
4+
35
use Magento\Backend\App\Action;
46
use Magento\Backend\Model\View\Result\Page;
57
use Magento\Framework\App\Action\HttpGetActionInterface;
68
use Magento\Framework\Controller\ResultFactory;
79
use Magento\Framework\Controller\ResultInterface;
10+
811
/**
912
* New action Company controller.
1013
*/
@@ -16,6 +19,7 @@ class NewAction extends Action implements HttpGetActionInterface
1619
* @see _isAllowed()
1720
*/
1821
const ADMIN_RESOURCE = 'Foo_Bar::company_id';
22+
1923
/**
2024
* Create new Company action.
2125
*
@@ -27,6 +31,7 @@ public function execute()
2731
$resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
2832
$resultPage->setActiveMenu('Foo_Bar::menu_id');
2933
$resultPage->getConfig()->getTitle()->prepend(__('New Company'));
34+
3035
return $resultPage;
3136
}
32-
}
37+
}

testData/actions/generation/generator/UiComponentGridXmlGenerator/generateUiGridForBaseArea/custom_entity_grid.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
</item>
99
</argument>
1010
<settings>
11+
<buttons>
12+
<button name="add">
13+
<url path="*/*/new"/>
14+
<class>primary</class>
15+
<label translate="true">Add New</label>
16+
</button>
17+
</buttons>
1118
<spinner>custom_entity_grid_columns</spinner>
1219
<deps>
1320
<dep>custom_entity_grid.custom_entity_grid_data_source</dep>

testData/actions/generation/generator/UiComponentGridXmlGenerator/generateUiGridWithoutToolbar/custom_entity_grid.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
</item>
99
</argument>
1010
<settings>
11+
<buttons>
12+
<button name="add">
13+
<url path="*/*/new"/>
14+
<class>primary</class>
15+
<label translate="true">Add New</label>
16+
</button>
17+
</buttons>
1118
<spinner>custom_entity_grid_columns</spinner>
1219
<deps>
1320
<dep>custom_entity_grid.custom_entity_grid_data_source</dep>

0 commit comments

Comments
 (0)