public function __construct(KernelInterface $kernel, $module, $action, $data = null)
{
parent::__construct($kernel);
// set properties
$this->setModule($module);
$this->setAction($action);
if ($data !== null) {
$this->setData($data);
}
// load the config file for the required module
$this->loadConfig();
// is the requested action possible? If not we throw an exception.
// We don't redirect because that could trigger a redirect loop
if (!in_array($this->getAction(), $this->config->getPossibleActions())) {
$this->setAction($this->config->getDefaultAction());
}
}