Skip to content

Commit 766a29f

Browse files
committed
Changed test template file
1 parent 4e2e13c commit 766a29f

File tree

1 file changed

+8
-12
lines changed
  • testData/actions/generation/generator/NewActionEntityGenerator/generateNewActionEntityFile

1 file changed

+8
-12
lines changed
Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
<?php
2-
32
namespace Foo\Bar\Controller\Adminhtml\Company;
4-
53
use Magento\Backend\App\Action;
6-
use Magento\Backend\Model\View\Result\Forward;
4+
use Magento\Backend\Model\View\Result\Page;
75
use Magento\Framework\App\Action\HttpGetActionInterface;
86
use Magento\Framework\Controller\ResultFactory;
97
use Magento\Framework\Controller\ResultInterface;
10-
118
/**
129
* New action Company controller.
1310
*/
@@ -19,18 +16,17 @@ class NewAction extends Action implements HttpGetActionInterface
1916
* @see _isAllowed()
2017
*/
2118
const ADMIN_RESOURCE = 'Foo_Bar::company_id';
22-
2319
/**
2420
* Create new Company action.
2521
*
26-
* @return ResultInterface|Forward
22+
* @return Page|ResultInterface
2723
*/
2824
public function execute()
2925
{
30-
/** @var Forward $resultForward */
31-
$resultForward = $this->resultFactory->create(ResultFactory::TYPE_FORWARD);
32-
$resultForward->forward('edit');
33-
34-
return $resultForward;
26+
/** @var Page $resultPage */
27+
$resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
28+
$resultPage->setActiveMenu('Foo_Bar::menu_id');
29+
$resultPage->getConfig()->getTitle()->prepend(__('New Company'));
30+
return $resultPage;
3531
}
36-
}
32+
}

0 commit comments

Comments
 (0)