The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit 96987707 authored by Demian Katz's avatar Demian Katz
Browse files

Modernize cover content plugin configuration.

- Change service names to fully qualified class names.
- Move configuration into plugin manager.
parent 7d0373aa
No related merge requests found
......@@ -440,22 +440,7 @@ $config = [
'syndeticsplus' => 'VuFind\Content\TOC\Factory::getSyndeticsPlus',
],
],
'content_covers' => [
'factories' => [
'amazon' => 'VuFind\Content\Covers\Factory::getAmazon',
'booksite' => 'VuFind\Content\Covers\Factory::getBooksite',
'buchhandel' => 'VuFind\Content\Covers\Factory::getBuchhandel',
'contentcafe' => 'VuFind\Content\Covers\Factory::getContentCafe',
'syndetics' => 'VuFind\Content\Covers\Factory::getSyndetics',
],
'invokables' => [
'google' => 'VuFind\Content\Covers\Google',
'librarything' => 'VuFind\Content\Covers\LibraryThing',
'localfile' => 'VuFind\Content\Covers\LocalFile',
'openlibrary' => 'VuFind\Content\Covers\OpenLibrary',
'summon' => 'VuFind\Content\Covers\Summon',
],
],
'content_covers' => [ /* see VuFind\Content\Covers\PluginManager for defaults */ ],
'content_reviews' => [
'factories' => [
'amazon' => 'VuFind\Content\Reviews\Factory::getAmazon',
......
......@@ -38,6 +38,51 @@ namespace VuFind\Content\Covers;
*/
class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager
{
/**
* Default plugin aliases.
*
* @var array
*/
protected $aliases = [
'amazon' => 'VuFind\Content\Covers\Amazon',
'booksite' => 'VuFind\Content\Covers\Booksite',
'buchhandel' => 'VuFind\Content\Covers\Buchhandel',
'contentcafe' => 'VuFind\Content\Covers\ContentCafe',
'google' => 'VuFind\Content\Covers\Google',
'librarything' => 'VuFind\Content\Covers\LibraryThing',
'localfile' => 'VuFind\Content\Covers\LocalFile',
'openlibrary' => 'VuFind\Content\Covers\OpenLibrary',
'summon' => 'VuFind\Content\Covers\Summon',
'syndetics' => 'VuFind\Content\Covers\Syndetics',
];
/**
* Default plugin factories.
*
* @var array
*/
protected $factories = [
'VuFind\Content\Covers\Amazon' => 'VuFind\Content\Covers\Factory::getAmazon',
'VuFind\Content\Covers\Booksite' =>
'VuFind\Content\Covers\Factory::getBooksite',
'VuFind\Content\Covers\Buchhandel' =>
'VuFind\Content\Covers\Factory::getBuchhandel',
'VuFind\Content\Covers\ContentCafe' =>
'VuFind\Content\Covers\Factory::getContentCafe',
'VuFind\Content\Covers\Google' =>
'Zend\ServiceManager\Factory\InvokableFactory',
'VuFind\Content\Covers\LibraryThing' =>
'Zend\ServiceManager\Factory\InvokableFactory',
'VuFind\Content\Covers\LocalFile' =>
'Zend\ServiceManager\Factory\InvokableFactory',
'VuFind\Content\Covers\OpenLibrary' =>
'Zend\ServiceManager\Factory\InvokableFactory',
'VuFind\Content\Covers\Summon' =>
'Zend\ServiceManager\Factory\InvokableFactory',
'VuFind\Content\Covers\Syndetics' =>
'VuFind\Content\Covers\Factory::getSyndetics',
];
/**
* Return the name of the base class or interface that plug-ins must conform
* to.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment