* @copyright Copyright 2020-2023 © Teamwant Mateusz Szymański All right reserved * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) * @category Teamwant * @package Teamwant */ namespace Teamwant\Prestashop17\Redis\Classes\Versions; use Media; use Teamwant\Prestashop17\Redis\Classes\TeamwantRedis; use Teamwant\Prestashop17\Redis\Classes\TeamwantRedisCacheConfig; use Tools; trait TeamwantRedisVersion { use TeamwantRedis; use TeamwantRedisCacheConfig; public function hookBackOfficeHeader() { // custom js variables Media::addJsDef([ 'token_AdminRedisConfiguration' => Tools::getAdminTokenLite('AdminRedisConfiguration'), ]); $controller = Tools::getValue('controller', ''); if ($controller === 'AdminPerformance') { //custom js variables Media::addJsDef([ 'tw_redis_lang_save_change_on_performance' => $this->l('Are you sure to save the changes? The redis configuration has not been saved.'), 'tw_redis_langs' => [ 0 => $this->l('Are you sure?'), ], ]); } // custom js $this->context->controller->addJs($this->_path . 'views/js/redis-admin1780.js'); // custom css (zostawiam wersje 1770) $this->context->controller->addCSS($this->_path . 'views/css/redis-admin1770.css'); } }