diff --git a/module/VuFind/src/VuFind/Summon.php b/module/VuFind/src/VuFind/Theme/Root/Helper/Summon.php similarity index 93% rename from module/VuFind/src/VuFind/Summon.php rename to module/VuFind/src/VuFind/Theme/Root/Helper/Summon.php index ee8597a651534c013b6a5ebfb2d7fbfd1db20981..1e73c76827b7d4233d81d855f3a9bf13355d10a0 100644 --- a/module/VuFind/src/VuFind/Summon.php +++ b/module/VuFind/src/VuFind/Theme/Root/Helper/Summon.php @@ -25,7 +25,8 @@ * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ -namespace VuFind; +namespace VuFind\Theme\Root\Helper; +use Zend\View\Helper\AbstractHelper; /** * Summon support functions. @@ -36,7 +37,7 @@ namespace VuFind; * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link http://www.vufind.org Main Page */ -class Summon +class Summon extends AbstractHelper { /** * Export support function to convert Summon format to EndNote format. @@ -45,7 +46,7 @@ class Summon * * @return string */ - public static function getEndnoteFormat($format) + public function getEndnoteFormat($format) { switch ($format) { case 'Journal Article': @@ -70,7 +71,7 @@ class Summon * * @return string */ - public static function getRefWorksFormat($format) + public function getRefWorksFormat($format) { switch ($format) { case 'Book Chapter': diff --git a/themes/root/templates/RecordDriver/Summon/export-endnote.phtml b/themes/root/templates/RecordDriver/Summon/export-endnote.phtml index 3b8e2e3146fbb6d196e2da1e088385bb716aa118..11b49399f999d5aed186865308c4fbe653d29f12 100644 --- a/themes/root/templates/RecordDriver/Summon/export-endnote.phtml +++ b/themes/root/templates/RecordDriver/Summon/export-endnote.phtml @@ -2,10 +2,10 @@ // Convert Summon formats to EndNote formats: $formats = $this->driver->getFormats(); foreach ($formats as $i => $format) { - $formats[$i] = \VuFind\Summon::getEndnoteFormat($format); + $formats[$i] = $this->summon()->getEndnoteFormat($format); } // Use the default template, but override the formats: $this->overrideFormats = $formats; -echo $this->render('RecordDriver/Base/export-endnote.phtml'); +echo $this->render('RecordDriver/AbstractBase/export-endnote.phtml'); ?> \ No newline at end of file diff --git a/themes/root/templates/RecordDriver/Summon/export-refworks.phtml b/themes/root/templates/RecordDriver/Summon/export-refworks.phtml index f11c469505598a8c568d6f992044cb75abc33d19..621f324cf5768bfb46d2526d00f4ef4d426eaeeb 100644 --- a/themes/root/templates/RecordDriver/Summon/export-refworks.phtml +++ b/themes/root/templates/RecordDriver/Summon/export-refworks.phtml @@ -2,10 +2,10 @@ // Convert Summon formats to RefWorks formats: $formats = $this->driver->getFormats(); foreach ($formats as $i => $format) { - $formats[$i] = \VuFind\Summon::getRefWorksFormat($format); + $formats[$i] = $this->summon()->getRefWorksFormat($format); } // Use the default template, but override the formats: $this->overrideFormats = $formats; -echo $this->render('RecordDriver/Base/export-refworks.phtml'); +echo $this->render('RecordDriver/AbstractBase/export-refworks.phtml'); ?> \ No newline at end of file diff --git a/themes/root/theme.ini b/themes/root/theme.ini index e6f8267ec949bae6d77cd50ed4a588e2f0ce9d9c..971c6c474eb988c431f3dceddc0a17025286baef 100644 --- a/themes/root/theme.ini +++ b/themes/root/theme.ini @@ -37,6 +37,7 @@ helpers_to_register[] = "Reviews" helpers_to_register[] = "SearchOptions" helpers_to_register[] = "SafeMoneyFormat" helpers_to_register[] = "SortFacetList" +helpers_to_register[] = "Summon" helpers_to_register[] = "SyndeticsPlus" helpers_to_register[] = "SystemEmail" helpers_to_register[] = "TransEsc"