diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/Module.php b/Module.php old mode 100644 new mode 100755 index fda8b7e..73aa10a --- a/Module.php +++ b/Module.php @@ -26,8 +26,8 @@ * @link https://github.com/dmj/vf2-proxy */ namespace DependentWorks; -use Zend\ModuleManager\ModuleManager, - Zend\Mvc\MvcEvent; +use Laminas\ModuleManager\ModuleManager, + Laminas\Mvc\MvcEvent; /** * Template for ZF2 module for storing local overrides. @@ -58,7 +58,7 @@ public function getConfig() public function getAutoloaderConfig() { return array( - 'Zend\Loader\StandardAutoloader' => array( + 'Laminas\Loader\StandardAutoloader' => array( 'namespaces' => array( __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__, ), diff --git a/README.md b/README.md new file mode 100644 index 0000000..8c6998e --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +# DependentWorks +This module displays related publications and volumes. + +## Usage +Integrate the module in the `modules` directory of VuFind and activate it by adding `DependentWorks` to `VUFIND_LOCAL_MODULES`. +When adding the module manually make sure to copy and adapt the config file and copy/symlink the theme. + +Add the following line to your detail view: +```php +render('RecordDriver/SolrDefault/dependentworks-core.phtml') ?> +``` \ No newline at end of file diff --git a/composer.json b/composer.json old mode 100644 new mode 100755 diff --git a/config/module.config.php b/config/module.config.php old mode 100644 new mode 100755 index 1b5041f..546cf23 --- a/config/module.config.php +++ b/config/module.config.php @@ -4,11 +4,23 @@ $config = [ 'service_manager' => [ 'allow_override' => true, + 'aliases' => [ + 'getDependentWorks' => 'DependentWorks\AjaxHandler\GetDependentWorks' + ], 'factories' => [ - 'DependentWorks\AjaxHandler\PluginManager' => 'VuFind\ServiceManager\AbstractPluginManagerFactory', + 'DependentWorks\AjaxHandler\GetDependentWorks' => 'DependentWorks\AjaxHandler\GetDependentWorksFactory', ], - 'aliases' => [ - 'VuFind\AjaxHandler\PluginManager' => 'DependentWorks\AjaxHandler\PluginManager' + ], + 'vufind' => [ + 'plugin_managers' => [ + 'ajaxhandler' => [ + 'aliases' => [ + 'getDependentWorks' => 'DependentWorks\AjaxHandler\GetDependentWorks' + ], + 'factories' => [ + 'DependentWorks\AjaxHandler\GetDependentWorks' => 'DependentWorks\AjaxHandler\GetDependentWorksFactory', + ], + ], ], ], ]; diff --git a/config/vufind/dependent-works.ini b/config/vufind/dependent-works.ini old mode 100644 new mode 100755 diff --git a/src/DependentWorks/AjaxHandler/GetDependentWorks.php b/src/DependentWorks/AjaxHandler/GetDependentWorks.php old mode 100644 new mode 100755 index bdc8963..1b58c8c --- a/src/DependentWorks/AjaxHandler/GetDependentWorks.php +++ b/src/DependentWorks/AjaxHandler/GetDependentWorks.php @@ -31,10 +31,10 @@ use VuFind\AjaxHandler\AbstractBase; use VuFind\Search\Results\PluginManager as ResultsManager; use VuFind\I18n\Translator\TranslatorAwareInterface; -use Zend\Http\PhpEnvironment\Request; -use Zend\Mvc\Controller\Plugin\Params; -use Zend\Stdlib\Parameters; -use Zend\Config\Config; +use Laminas\Http\PhpEnvironment\Request; +use Laminas\Mvc\Controller\Plugin\Params; +use Laminas\Stdlib\Parameters; +use Laminas\Config\Config; /** * This controller handles global AJAX functionality diff --git a/src/DependentWorks/AjaxHandler/GetDependentWorksFactory.php b/src/DependentWorks/AjaxHandler/GetDependentWorksFactory.php old mode 100644 new mode 100755 index 8990cb7..346cdcc --- a/src/DependentWorks/AjaxHandler/GetDependentWorksFactory.php +++ b/src/DependentWorks/AjaxHandler/GetDependentWorksFactory.php @@ -1,6 +1,6 @@ - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License - * @link https://vufind.org/wiki/development Wiki - */ -namespace DependentWorks\AjaxHandler; - -/** - * AJAX handler plugin manager - * - * @category VuFind - * @package AJAX - * @author Demian Katz - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License - * @link https://vufind.org/wiki/development Wiki - */ -//class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager -class PluginManager extends \VuFind\AjaxHandler\PluginManager -{ - /** - * Default plugin aliases. - * - * @var array - */ - protected $aliases = [ - 'checkRequestIsValid' => 'VuFind\AjaxHandler\CheckRequestIsValid', - 'commentRecord' => 'VuFind\AjaxHandler\CommentRecord', - 'deleteRecordComment' => 'VuFind\AjaxHandler\DeleteRecordComment', - 'getACSuggestions' => 'VuFind\AjaxHandler\GetACSuggestions', - 'getDependentWorks' => 'DependentWorks\AjaxHandler\GetDependentWorks', - 'getFacetData' => 'VuFind\AjaxHandler\GetFacetData', - 'getIlsStatus' => 'VuFind\AjaxHandler\GetIlsStatus', - 'getItemStatuses' => 'VuFind\AjaxHandler\GetItemStatuses', - 'getLibraryPickupLocations' => - 'VuFind\AjaxHandler\GetLibraryPickupLocations', - 'getRecordCommentsAsHTML' => 'VuFind\AjaxHandler\GetRecordCommentsAsHTML', - 'getRecordDetails' => 'VuFind\AjaxHandler\GetRecordDetails', - 'getRecordTags' => 'VuFind\AjaxHandler\GetRecordTags', - 'getRequestGroupPickupLocations' => - 'VuFind\AjaxHandler\GetRequestGroupPickupLocations', - 'getResolverLinks' => 'VuFind\AjaxHandler\GetResolverLinks', - 'getResultCount' => 'BelugaConfig\AjaxHandler\GetResultCount', - 'getSaveStatuses' => 'VuFind\AjaxHandler\GetSaveStatuses', - 'getVisData' => 'VuFind\AjaxHandler\GetVisData', - 'keepAlive' => 'VuFind\AjaxHandler\KeepAlive', - 'recommend' => 'VuFind\AjaxHandler\Recommend', - 'relaisAvailability' => 'VuFind\AjaxHandler\RelaisAvailability', - 'relaisInfo' => 'VuFind\AjaxHandler\RelaisInfo', - 'relaisOrder' => 'VuFind\AjaxHandler\RelaisOrder', - 'systemStatus' => 'VuFind\AjaxHandler\SystemStatus', - 'tagRecord' => 'VuFind\AjaxHandler\TagRecord', - ]; - - /** - * Default plugin factories. - * - * @var array - */ - protected $factories = [ - 'BelugaConfig\AjaxHandler\GetResultCount' => - 'BelugaConfig\AjaxHandler\GetResultCountFactory', - 'DependentWorks\AjaxHandler\GetDependentWorks' => - 'DependentWorks\AjaxHandler\GetDependentWorksFactory', - 'VuFind\AjaxHandler\CheckRequestIsValid' => - 'VuFind\AjaxHandler\AbstractIlsAndUserActionFactory', - 'VuFind\AjaxHandler\CommentRecord' => - 'VuFind\AjaxHandler\CommentRecordFactory', - 'VuFind\AjaxHandler\DeleteRecordComment' => - 'VuFind\AjaxHandler\DeleteRecordCommentFactory', - 'VuFind\AjaxHandler\GetACSuggestions' => - 'VuFind\AjaxHandler\GetACSuggestionsFactory', - 'VuFind\AjaxHandler\GetFacetData' => - 'VuFind\AjaxHandler\GetFacetDataFactory', - 'VuFind\AjaxHandler\GetIlsStatus' => - 'VuFind\AjaxHandler\GetIlsStatusFactory', - 'VuFind\AjaxHandler\GetItemStatuses' => - 'VuFind\AjaxHandler\GetItemStatusesFactory', - 'VuFind\AjaxHandler\GetLibraryPickupLocations' => - 'VuFind\AjaxHandler\AbstractIlsAndUserActionFactory', - 'VuFind\AjaxHandler\GetRecordCommentsAsHTML' => - 'VuFind\AjaxHandler\GetRecordCommentsAsHTMLFactory', - 'VuFind\AjaxHandler\GetRecordDetails' => - 'VuFind\AjaxHandler\GetRecordDetailsFactory', - 'VuFind\AjaxHandler\GetRecordTags' => - 'VuFind\AjaxHandler\GetRecordTagsFactory', - 'VuFind\AjaxHandler\GetRequestGroupPickupLocations' => - 'VuFind\AjaxHandler\AbstractIlsAndUserActionFactory', - 'VuFind\AjaxHandler\GetResolverLinks' => - 'VuFind\AjaxHandler\GetResolverLinksFactory', - 'VuFind\AjaxHandler\GetSaveStatuses' => - 'VuFind\AjaxHandler\GetSaveStatusesFactory', - 'VuFind\AjaxHandler\GetVisData' => 'VuFind\AjaxHandler\GetVisDataFactory', - 'VuFind\AjaxHandler\KeepAlive' => 'VuFind\AjaxHandler\KeepAliveFactory', - 'VuFind\AjaxHandler\Recommend' => 'VuFind\AjaxHandler\RecommendFactory', - 'VuFind\AjaxHandler\RelaisAvailability' => - 'VuFind\AjaxHandler\AbstractRelaisActionFactory', - 'VuFind\AjaxHandler\RelaisInfo' => - 'VuFind\AjaxHandler\AbstractRelaisActionFactory', - 'VuFind\AjaxHandler\RelaisOrder' => - 'VuFind\AjaxHandler\AbstractRelaisActionFactory', - 'VuFind\AjaxHandler\SystemStatus' => - 'VuFind\AjaxHandler\SystemStatusFactory', - 'VuFind\AjaxHandler\TagRecord' => 'VuFind\AjaxHandler\TagRecordFactory', - ]; -} diff --git a/theme/js/dependentworks.js b/theme/js/dependentworks.js old mode 100644 new mode 100755 diff --git a/theme/mixin.config.php b/theme/mixin.config.php old mode 100644 new mode 100755 diff --git a/theme/templates/RecordDriver/SolrDefault/dependentworks-core.phtml b/theme/templates/RecordDriver/SolrDefault/dependentworks-core.phtml old mode 100644 new mode 100755