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>'); } }
/** * 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(); }
/** * Purge the internal cache */ public function purgeInternalCache() { if ($GLOBALS['TL_CONFIG']['bypassCache']) { return; } parent::purgeInternalCache(); }
/** * @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; }