Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ManagerStub.php
Go to the documentation of this file.
1 <?php
11 
12 class ManagerStub implements \Magento\Framework\Event\ManagerInterface
13 {
21  public function dispatch($eventName, array $params = [])
22  {
23  switch ($eventName) {
24  case 'cms_controller_router_match_before':
25  $params['condition']->setRedirectUrl('http://www.example.com/');
26  break;
27  }
28 
29  return null;
30  }
31 }
dispatch($eventName, array $params=[])
Definition: ManagerStub.php:21
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE]
Definition: website.php:18