Exemplo n.º 1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $this->detectContao($output, true);
     if ($this->initContao()) {
         $automator = new \Automator();
         $automator->generateInternalCache();
         $output->writeln('<info>Internal cache generated</info>');
     }
 }
Exemplo n.º 2
0
 /**
  * Check for modified products and update the XML files if necessary
  */
 public function generate()
 {
     $session = $this->Session->get('iso_product_updater');
     if (!is_array($session) || empty($session)) {
         return;
     }
     $objAutomator = new \Automator();
     $objAutomator->generateSitemap();
     $this->Session->set('iso_product_updater', null);
 }
 protected function generate()
 {
     if (!is_dir(TL_ROOT . '/' . $this->cacheDirectory)) {
         $this->makeCacheDirectory();
     }
     $file = new \File($this->cacheFile);
     $file->truncate();
     $file->putContent($file->path, json_encode($this->cacheUrl));
     $automator = new \Automator();
     $automator->purgePageCache();
 }
Exemplo n.º 4
0
 /**
  * Purge the internal cache
  */
 public function purgeInternalCache()
 {
     if ($GLOBALS['TL_CONFIG']['bypassCache']) {
         return;
     }
     parent::purgeInternalCache();
 }
Exemplo n.º 5
0
 /**
  * @param $varValue
  * @param DataContainer $dc
  * @return mixed
  */
 public function updateTable($varValue, \DataContainer $dc)
 {
     if (!$dc->activeRecord->tablename) {
         return $varValue;
     }
     $preTableName = $dc->activeRecord->tablename;
     $strTableName = $varValue;
     $preDataTableName = $preTableName . '_data';
     $strDataTableName = $strTableName . '_data';
     if (!$this->Database->tableExists($varValue) && $preTableName != $strTableName) {
         $this->Database->prepare("RENAME TABLE " . $preTableName . " TO " . $strTableName . "")->execute();
         $this->Database->prepare("RENAME TABLE " . $preDataTableName . " TO " . $strDataTableName . "")->execute();
         $this->Database->prepare("UPDATE tl_content SET ptable = ? WHERE ptable = ?")->execute($strDataTableName, $preDataTableName);
     }
     if (!\Config::get('bypassCache')) {
         $a = new \Automator();
         $a->purgeInternalCache();
     }
     return $varValue;
 }