Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
SolrArchivesSpace | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
getURLs | |
0.00% |
0 / 4 |
|
0.00% |
0 / 1 |
6 |
1 | <?php |
2 | |
3 | /** |
4 | * Model for ArchivesSpace records in Solr. |
5 | * |
6 | * PHP version 8 |
7 | * |
8 | * Copyright (C) Villanova University 2020. |
9 | * |
10 | * This program is free software; you can redistribute it and/or modify |
11 | * it under the terms of the GNU General Public License version 2, |
12 | * as published by the Free Software Foundation. |
13 | * |
14 | * This program is distributed in the hope that it will be useful, |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | * GNU General Public License for more details. |
18 | * |
19 | * You should have received a copy of the GNU General Public License |
20 | * along with this program; if not, write to the Free Software |
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
22 | * |
23 | * @category VuFind |
24 | * @package RecordDrivers |
25 | * @author Demian Katz <demian.katz@villanova.edu> |
26 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
27 | * @link https://vufind.org/wiki/development:plugins:record_drivers Wiki |
28 | */ |
29 | |
30 | namespace VuFind\RecordDriver; |
31 | |
32 | /** |
33 | * Model for ArchivesSpace records in Solr. |
34 | * |
35 | * @category VuFind |
36 | * @package RecordDrivers |
37 | * @author Demian Katz <demian.katz@villanova.edu> |
38 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
39 | * @link https://vufind.org/wiki/development:plugins:record_drivers Wiki |
40 | */ |
41 | class SolrArchivesSpace extends SolrDefault |
42 | { |
43 | /** |
44 | * Return an array of associative URL arrays with one or more of the following |
45 | * keys: |
46 | * |
47 | * <li> |
48 | * <ul>desc: URL description text to display (optional)</ul> |
49 | * <ul>url: fully-formed URL (required if 'route' is absent)</ul> |
50 | * <ul>route: VuFind route to build URL with (required if 'url' is absent)</ul> |
51 | * <ul>routeParams: Parameters for route (optional)</ul> |
52 | * <ul>queryString: Query params to append after building route (optional)</ul> |
53 | * </li> |
54 | * |
55 | * @return array |
56 | */ |
57 | public function getURLs() |
58 | { |
59 | $urls = parent::getURLs(); |
60 | // We're going to assume that if there is a link, it's always pointing at |
61 | // the finding aid in the ArchivesSpace front end. |
62 | if (isset($urls[0])) { |
63 | $urls[0]['desc'] = $this->translate('Finding Aid'); |
64 | } |
65 | return $urls; |
66 | } |
67 | } |