Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Logout.php
Go to the documentation of this file.
1 <?php
8 
11 
12 class Logout extends \Magento\Backend\Controller\Adminhtml\Auth implements HttpGet, HttpPost
13 {
19  public function execute()
20  {
21  $this->_auth->logout();
22  $this->messageManager->addSuccessMessage(__('You have logged out.'));
23 
25  $resultRedirect = $this->resultRedirectFactory->create();
26  return $resultRedirect->setPath($this->_helper->getHomePageUrl());
27  }
28 }
__()
Definition: __.php:13