Skip to content

Commit

Permalink
Merge pull request #1 from qcovery/vufind9
Browse files Browse the repository at this point in the history
Vufind9
  • Loading branch information
jschultze authored Mar 5, 2024
2 parents 6270fc2 + 5f2f671 commit 8dfeb87
Show file tree
Hide file tree
Showing 45 changed files with 126 additions and 428 deletions.
Empty file modified .gitignore
100644 → 100755
Empty file.
6 changes: 3 additions & 3 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
* @link https://github.com/dmj/vf2-proxy
*/
namespace Delivery;
use Zend\ModuleManager\ModuleManager,
Zend\Mvc\MvcEvent;
use Laminas\ModuleManager\ModuleManager,
Laminas\Mvc\MvcEvent;

/**
* Template for ZF2 module for storing local overrides.
Expand Down Expand Up @@ -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__,
),
Expand Down
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Delivery
This module adds a custom form to integrate a digitization/delivery-on-demand service.
The form can be configured via configuration files and can also be restricted to certain user groups.

## Usage
Integrate the module in the `modules` directory of VuFind and activate it by adding `Delivery` to `VUFIND_LOCAL_MODULES`.
When adding the module manually make sure to copy and adapt the config files and copy/symlink the theme.
Make sure to set up your database correctly by applying `sql/mysql.sql` to your VuFind database.

Add the following lines to your templates to enable the functionality of this module:
```php
<?=$this->render('myresearch/delivery-menu.phtml', ['active' => $this->active, 'profile' => $this->profile]); ?>
```
Add this line to the myresearch menu.

```php
?=$this->render('RecordDriver/DefaultRecord/delivery-toolbar.phtml'); ?>
```
Add this line to the detail view.

```php
<?=$this->render('RecordDriver/DefaultRecord/delivery-result-list.phtml'); ?>
```
Add this line to the body of the result list entry.
Empty file modified composer.json
100644 → 100755
Empty file.
31 changes: 26 additions & 5 deletions config/module.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,38 @@
'service_manager' => [
'allow_override' => true,
'factories' => [
'Delivery\Db\Table\PluginManager' => 'VuFind\ServiceManager\AbstractPluginManagerFactory',
'Delivery\Db\Row\PluginManager' => 'VuFind\ServiceManager\AbstractPluginManagerFactory',
'Delivery\Driver\PluginManager' => 'VuFind\ServiceManager\AbstractPluginManagerFactory',
'Delivery\Auth\DeliveryAuthenticator' => 'Delivery\Auth\DeliveryAuthenticatorFactory',
'Delivery\AjaxHandler\CheckAvailability' => 'Delivery\AjaxHandler\CheckAvailabilityFactory',
'Delivery\Db\Row\Delivery' => 'VuFind\Db\Row\RowGatewayFactory',
'Delivery\Db\Row\UserDelivery' => 'VuFind\Db\Row\RowGatewayFactory',
'Delivery\Db\Table\Delivery' => 'VuFind\Db\Table\GatewayFactory',
'Delivery\Db\Table\UserDelivery' => 'VuFind\Db\Table\GatewayFactory',
'Delivery\Driver\Dod' => 'Delivery\Driver\DriverFactory',
'Delivery\Driver\MyBib' => 'Delivery\Driver\DriverFactory',
],
'aliases' => [
'VuFind\Db\Table\PluginManager' => 'Delivery\Db\Table\PluginManager',
'VuFind\Db\Row\PluginManager' => 'Delivery\Db\Row\PluginManager',
'VuFind\ILSAuthenticator' => 'Delivery\Auth\DeliveryAuthenticator',
'checkAvailability' => 'Delivery\AjaxHandler\CheckAvailability',
'dod' => 'Delivery\Driver\Dod',
'mybib' => 'Delivery\Driver\MyBib',
],
],
'db_row' => [
'service_manager' => [
'aliases' => [
'delivery' => 'Delivery\Db\Row\Delivery',
'userdelivery' => 'Delivery\Db\Row\UserDelivery',
]
]
],
'db_table' => [
'service_manager' => [
'aliases' => [
'delivery' => 'Delivery\Db\Table\Delivery',
'userdelivery' => 'Delivery\Db\Table\UserDelivery',
]
]
],
];

// Define static routes -- Controller/Action strings
Expand Down
Empty file modified config/vufind/delivery.ini
100644 → 100755
Empty file.
Empty file modified config/vufind/deliveryAvailability.ini
100644 → 100755
Empty file.
Empty file modified config/vufind/deliveryGlobal.ini
100644 → 100755
Empty file.
Empty file modified config/vufind/deliveryMarc.yaml
100644 → 100755
Empty file.
Empty file modified config/vufind/deliveryOrderData.ini
100644 → 100755
Empty file.
Empty file modified sql/mysql.sql
100644 → 100755
Empty file.
10 changes: 5 additions & 5 deletions src/Delivery/AjaxHandler/CheckAvailability.php
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* "Get Record Details" AJAX handler
* CheckAvailability AJAX handler
*
* PHP version 7
*
Expand Down Expand Up @@ -32,12 +32,12 @@
use VuFind\AjaxHandler\AbstractBase;
use VuFind\Config\PluginManager as ConfigManager;
use VuFind\Search\Results\PluginManager as ResultsManager;
use Zend\Http\PhpEnvironment\Request;
use Zend\Mvc\Controller\Plugin\Params;
use Zend\Stdlib\Parameters;
use Laminas\Http\PhpEnvironment\Request;
use Laminas\Mvc\Controller\Plugin\Params;
use Laminas\Stdlib\Parameters;

/**
* "Get Record Details" AJAX handler
* CheckAvailability AJAX handler
*
* Get record for integrated list view.
*
Expand Down
6 changes: 3 additions & 3 deletions src/Delivery/AjaxHandler/CheckAvailabilityFactory.php
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Factory for GetRecordDetails AJAX handler.
* Factory for CheckAvailability AJAX handler.
*
* PHP version 7
*
Expand Down Expand Up @@ -30,7 +30,7 @@
use Interop\Container\ContainerInterface;

/**
* Factory for GetRecordDetails AJAX handler.
* Factory for CheckAvailability AJAX handler.
*
* @category VuFind
* @package AJAX
Expand All @@ -39,7 +39,7 @@
* @link https://vufind.org/wiki/development Wiki
*/
class CheckAvailabilityFactory
implements \Zend\ServiceManager\Factory\FactoryInterface
implements \Laminas\ServiceManager\Factory\FactoryInterface
{
/**
* Create an object
Expand Down
137 changes: 0 additions & 137 deletions src/Delivery/AjaxHandler/PluginManager.php

This file was deleted.

11 changes: 11 additions & 0 deletions src/Delivery/Auth/DeliveryAuthenticator.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,22 @@ public function getUser()
return $this->user;
}

/**
* Get configured Delivery domains.
*
* @return array
*/
public function getDeliveryDomains()
{
return $this->configurationManager->getDeliveryDomains();
}

/**
* Get configured template parameters.
*
* @param $deliveryDomain
* @return array
*/
public function getTemplateParams($deliveryDomain)
{
$this->configurationManager->setConfigurations($deliveryDomain);
Expand Down
2 changes: 1 addition & 1 deletion src/Delivery/Auth/DeliveryAuthenticatorFactory.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
namespace Delivery\Auth;

use Interop\Container\ContainerInterface;
use Zend\ServiceManager\Factory\FactoryInterface;
use Laminas\ServiceManager\Factory\FactoryInterface;

/**
* ILS Authenticator factory.
Expand Down
Empty file modified src/Delivery/AvailabilityHelper.php
100644 → 100755
Empty file.
Empty file modified src/Delivery/ConfigurationManager.php
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions src/Delivery/Controller/DeliveryController.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
*/
namespace Delivery\Controller;

# use Zend\ServiceManager\ServiceLocatorAwareInterface;
use Zend\ServiceManager\ServiceLocatorInterface;
# use Laminas\ServiceManager\ServiceLocatorAwareInterface;
use Laminas\ServiceManager\ServiceLocatorInterface;
use VuFind\Controller\AbstractBase;
use Delivery\AvailabilityHelper;
use Delivery\ConfigurationManager;
Expand Down
2 changes: 1 addition & 1 deletion src/Delivery/Controller/Factory.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/
namespace Delivery\Controller;

use Zend\ServiceManager\ServiceManager;
use Laminas\ServiceManager\ServiceManager;

/**
* Factory for controllers.
Expand Down
Empty file modified src/Delivery/DataHandler.php
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion src/Delivery/Db/Row/Delivery.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/
namespace Delivery\Db\Row;
use VuFind\Db\Row\RowGateway;
use Zend\Db\Adapter\Adapter;
use Laminas\Db\Adapter\Adapter;
use VuFind\Exception\LoginRequired as LoginRequiredException;

/**
Expand Down
Loading

0 comments on commit 8dfeb87

Please sign in to comment.