Analyzing class Piwik\FrontController
Description
This singleton dispatches requests to the appropriate plugin Controller.
Piwik uses this class for all requests that go through index.php. Plugins can use it to call controller actions of other plugins.
Examples
Forwarding controller requests**
public function myConfiguredRealtimeMap() { $_GET['changeVisitAlpha'] = false; $_GET['removeOldVisits'] = false; $_GET['showFooterMessage'] = false; return FrontController::getInstance()->dispatch('UserCountryMap', 'realtimeMap'); }
Using other plugin controller actions**
public function myPopupWithRealtimeMap() { $_GET['changeVisitAlpha'] = false; $_GET['removeOldVisits'] = false; $_GET['showFooterMessage'] = false; $realtimeMap = FrontController::getInstance()->dispatch('UserCountryMap', 'realtimeMap');
$view = new View('@MyPlugin/myPopupWithRealtimeMap.twig'); $view->realtimeMap = $realtimeMap; return $realtimeMap->render(); }
For a detailed explanation, see the documentation here.
Type hierarchy
-
piwik/piwik 15477.x-dev 15414.x-dev 15307.x-dev 6265.x-dev 15534.x-dev 14944.x-dev 14939.x-dev 14054.x-dev 13835.x-dev 15176.x-dev 14744.x-dev 14612.x-dev 14428.x-dev 14395.x-dev 14223.x-dev 14188.x-dev 13989.x-dev 13383.x-dev 13325.x-dev 13272.x-dev 13070.x-dev 11942.x-dev 10801.x-dev 7105.x-dev 5711.x-dev 539.x-dev 11058.x-dev 13246.x-dev 16501.x-dev 16481.x-dev