Exemplo n.º 1
0
 public function postActivation(ConnectionInterface $con = null)
 {
     if (null === ConfigQuery::read(static::RESOURCE_PATH_CONFIG_NAME)) {
         $config = new Config();
         $config->setHidden(0)->setSecured(0)->setName(static::RESOURCE_PATH_CONFIG_NAME)->setValue(__DIR__ . DS . "Resources")->getTranslation("fr_FR")->setTitle("Chemin de templates pour Thelia studio")->getConfig()->getTranslation("en_US")->setTitle("Templates path for Thelia studio");
         $config->save();
     }
 }
Exemplo n.º 2
0
 public static function write($configName, $value, $secured = null, $hidden = null)
 {
     $config = self::create()->findOneByName($configName);
     if (null == $config) {
         $config = new Config();
         $config->setName($configName);
     }
     if ($secured !== null) {
         $config->setSecured($secured ? 1 : 0);
     }
     if ($hidden !== null) {
         $config->setHidden($hidden ? 1 : 0);
     }
     $config->setValue($value);
     $config->save();
     self::$cache[$configName] = $value;
 }