17 import(
'lib.pkp.classes.plugins.GatewayPlugin');
28 parent::__construct();
29 $this->_parentPlugin = $parentPlugin;
46 return 'WebFeedGatewayPlugin';
53 return __(
'plugins.generic.webfeed.displayName');
60 return __(
'plugins.generic.webfeed.description');
67 return $this->_parentPlugin->getPluginPath();
76 return $this->_parentPlugin->getEnabled();
85 if (!$this->_parentPlugin->getEnabled())
return false;
88 $type = array_shift($args);
95 'rss' =>
'application/rdf+xml',
96 'rss2' =>
'application/rss+xml',
97 'atom' =>
'application/atom+xml'
99 if (!isset($typeMap[$type]))
return false;
105 import(
'classes.submission.SubmissionDAO');
108 'status' => STATUS_PUBLISHED,
109 'contextId' => $context->getId(),
111 'orderBy' => ORDERBY_DATE_PUBLISHED,
113 $recentItems = (int) $this->_parentPlugin->getSetting($context->getId(),
'recentItems');
114 if ($recentItems > 0) {
115 $args[
'count'] = $recentItems;
117 $templateMgr->assign(
'submissions', iterator_to_array(
Services::get(
'submission')->getMany($args)));
120 $version = $versionDao->getCurrentVersion();
121 $templateMgr->assign(
'ompVersion', $version->getVersionString());