private function getBasedPage($file)
{
static $baseHTML;
if (empty($baseHTML)) {
$baseHTML = file_get_contents($this->config->dir_root . '/media/devfaceted/datas/base.html');
$title = $file == 'index' ? 'Dashboard' : $file;
$baseHTML = $this->injectBloc($baseHTML, 'TITLE', $title);
$baseHTML = $this->injectBloc($baseHTML, 'PROJECT', $this->config->project);
$baseHTML = $this->injectBloc($baseHTML, 'PROJECT_LETTER', strtoupper($this->config->project[0]));
$menu = file_get_contents($this->tmpName . '/datas/menu.html');
$inventories = '';
foreach ($this->inventories as $fileName => $title) {
$inventories .= " <li><a href=\"inventories_{$fileName}.html\"><i class=\"fa fa-circle-o\"></i>{$title}</a></li>\n";
}
$menu = $this->injectBloc($menu, 'INVENTORIES', $inventories);
$baseHTML = $this->injectBloc($baseHTML, 'SIDEBARMENU', $menu);
}
$subPageHTML = file_get_contents($this->config->dir_root . '/media/devfaceted/datas/' . $file . '.html');
$combinePageHTML = $this->injectBloc($baseHTML, "BLOC-MAIN", $subPageHTML);
return $combinePageHTML;
}