chocolatdemariage/www/modules/antadissimulator/controllers/admin/AdminAntadisSimulatorDetailController.php

45 lines
1.5 KiB
PHP
Raw Normal View History

2017-07-31 12:10:21 +02:00
<?php
class AdminAntadisSimulatorDetailController extends ModuleAdminController
{
public function __construct()
{
2017-07-31 16:01:07 +02:00
// Enable bootstrap
$this->bootstrap = true;
2017-07-31 12:10:21 +02:00
// Call of the parent constructor method
parent::__construct();
}
public function renderList()
{
2017-07-31 16:01:07 +02:00
//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;
2017-08-04 10:32:25 +02:00
$imgPath = _PS_ROOT_DIR_.'/themes/simulation/'.$simulator->code.'/'.$themeName;
2017-08-03 10:02:18 +02:00
// Test repertoire du theme
$isThemeDirExist = file_exists($imgPath);
2017-07-31 12:10:21 +02:00
2017-07-31 16:01:07 +02:00
$tpl = $this->context->smarty->createTemplate(dirname(__FILE__). '/../../views/templates/admin/simulator-details.tpl');
$tpl->assign(array(
2017-08-03 10:02:18 +02:00
'isThemeDirExist' => $isThemeDirExist,
2017-07-31 16:01:07 +02:00
'id_simulator' => $id_simulator,
'id_simulator_theme' => $id_simulator_theme,
'simulator' => $simulator,
'simulatorType' => $simulatorType,
'themes' => $themes,
'imgPath' => $imgPath,
));
return $tpl->fetch();
2017-07-31 12:10:21 +02:00
}
}