public function xmlBranch() { $rootID = $this->request->get("id"); $xmlResponse = new XMLResponse(); $xmlResponse->set("rootID", $rootID); $xmlResponse->set("tree", $this->getSubDirectories($rootID)); return $xmlResponse; }
public function export() { $module = $this->request->get('module'); $enabledFeeds = $this->config->get('ENABLED_FEEDS'); if (!isset($enabledFeeds[$module]) || $this->request->get('key') != $this->config->get('FEED_KEY')) { return; } $this->setLayout('empty'); set_time_limit(0); $cat = Category::getRootNode(true); $filter = new ProductFilter($cat, new ARSelectFilter()); $filter->includeSubCategories(); $feed = new ProductFeed($filter); $feed->setFlush(); $response = new XMLResponse(); $response->set('feed', $feed); $response->set('tpl', 'xml/feed/' . $module . '.tpl'); return $response; }
public function news() { $this->shouldBeEnabledFeed('NEWS_POSTS'); $this->setLayout('empty'); $response = new XMLResponse(); $f = select(eq(f('NewsPost.isEnabled'), true)); $f->setLimit($this->config->get('NUMBER_OF_NEWS_POSTS_TO_INCLUDE')); $f->setOrder(f('NewsPost.position'), ARSelectFilter::ORDER_DESC); $response->set('feed', ActiveRecordModel::getRecordSetArray('NewsPost', $f)); $this->application->getLocale()->translationManager()->loadFile('News'); return $response; }
public function xmlRecursivePath() { $xmlResponse = new XMLResponse(); $targetID = (int) $this->request->get("id"); try { $categoriesList = Category::getInstanceByID($targetID)->getPathBranchesArray(); if (count($categoriesList) > 0 && isset($categoriesList['children'][0]['parent'])) { $xmlResponse->set("rootID", $categoriesList['children'][0]['parent']); $xmlResponse->set("categoryList", $categoriesList); } $xmlResponse->set("doNotTouch", $this->request->get("doNotTouch")); } catch (Exception $e) { } $xmlResponse->set("targetID", $targetID); return $xmlResponse; }