public function initLayout()
{
if ($this->pathfinder->sandbox) {
$this->initAddons();
} else {
if (preg_match('/^sandbox_/', $this->app->page)) {
$this->app->redirect('sandbox');
}
}
$this->addLayout('mainMenu');
parent::initLayout();
$this->initTopMenu();
if (!$this->pathfinder->sandbox && !$this->app->getConfig('production', false)) {
$this->menu->addItem(array('Install Developer Toools', 'icon' => 'tools'), 'sandbox');
}
if (@$this->sandbox) {
$this->sandbox->initLayout();
}
}