chocolatdemariage/www/modules/antadissimulator/controllers/admin/AdminAntadisSimulatorDetailController.php
2017-08-04 10:32:25 +02:00

45 lines
1.5 KiB
PHP

<?php
class AdminAntadisSimulatorDetailController extends ModuleAdminController
{
public function __construct()
{
// Enable bootstrap
$this->bootstrap = true;
// Call of the parent constructor method
parent::__construct();
}
public function renderList()
{
//id_simulator
//id_simulator_theme
// On présente les faces qu'il faut customiser pour positionner les marqueurs
$id_simulator = Tools::getValue('id_simulator');
$id_simulator_theme = Tools::getValue('id_simulator_theme');
$simulator = new Simulator($id_simulator);
$simulatorType = strstr($simulator->code, '-', true);
$theme = new SimulatorTheme($id_simulator_theme);
$themeName = $theme->name;
$imgPath = _PS_ROOT_DIR_.'/themes/simulation/'.$simulator->code.'/'.$themeName;
// Test repertoire du theme
$isThemeDirExist = file_exists($imgPath);
$tpl = $this->context->smarty->createTemplate(dirname(__FILE__). '/../../views/templates/admin/simulator-details.tpl');
$tpl->assign(array(
'isThemeDirExist' => $isThemeDirExist,
'id_simulator' => $id_simulator,
'id_simulator_theme' => $id_simulator_theme,
'simulator' => $simulator,
'simulatorType' => $simulatorType,
'themes' => $themes,
'imgPath' => $imgPath,
));
return $tpl->fetch();
}
}