public function __construct(KernelInterface $kernel)
{
parent::__construct($kernel);
// store for later use throughout the application
$this->getContainer()->set('navigation', $this);
$this->URL = $this->getContainer()->get('url');
// check if navigation cache file exists
if (!is_file(self::getCacheDirectory() . 'navigation.php')) {
$this->buildCache();
}
// check if editor_link_list_LANGUAGE.js cache file exists
if (!is_file(FRONTEND_CACHE_PATH . '/Navigation/editor_link_list_' . BackendLanguage::getWorkingLanguage() . '.js')) {
BackendPagesModel::buildCache(BackendLanguage::getWorkingLanguage());
}
$navigation = array();
// require navigation-file
require self::getCacheDirectory() . 'navigation.php';
// load it
$this->navigation = (array) $navigation;
$this->navigation = $this->addActiveStateToNavigation($this->navigation);
// cleanup navigation (not needed for god user)
if (!Authentication::getUser()->isGod()) {
$this->navigation = $this->cleanup($this->navigation);
}
}