/** * 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); }