forked from magento/magento2-phpstorm-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEdit.php
37 lines (32 loc) · 950 Bytes
/
Edit.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
namespace Foo\Bar\Controller\Adminhtml\Book;
use Magento\Backend\App\Action;
use Magento\Backend\Model\View\Result\Page;
use Magento\Framework\App\Action\HttpGetActionInterface;
use Magento\Framework\Controller\ResultFactory;
use Magento\Framework\Controller\ResultInterface;
/**
* Edit Book entity backend controller.
*/
class Edit extends Action implements HttpGetActionInterface
{
/**
* Authorization level of a basic admin session.
*
* @see _isAllowed()
*/
const ADMIN_RESOURCE = 'Foo_Bar::management';
/**
* Edit Book action.
*
* @return Page|ResultInterface
*/
public function execute()
{
/** @var Page $resultPage */
$resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
$resultPage->setActiveMenu('Foo_Bar::management');
$resultPage->getConfig()->getTitle()->prepend(__('Edit Book'));
return $resultPage;
}
}