/
arMigration0107.class.php
74 lines (69 loc) · 2.29 KB
/
arMigration0107.class.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
/*
* This file is part of the Access to Memory (AtoM) software.
*
* Access to Memory (AtoM) is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Access to Memory (AtoM) is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Access to Memory (AtoM). If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Add element visibility RAD and ISAD settings for archival history field
*
* @package AccesstoMemory
* @subpackage migration
*/
class arMigration0107
{
public const VERSION = 107;
public const MIN_MILESTONE = 2;
/**
* Upgrade.
*
* @param mixed $configuration
*
* @return bool True if the upgrade succeeded, False otherwise
*/
public function up($configuration)
{
$elements = [
'rad_title_responsibility_area',
'rad_edition_area',
'rad_material_specific_details_area',
'rad_dates_of_creation_area',
'rad_physical_description_area',
'rad_publishers_series_area',
'rad_archival_description_area',
'rad_notes_area',
'rad_standard_number_area',
'rad_access_points_area',
'rad_description_control_area',
'isad_identity_area',
'isad_context_area',
'isad_content_and_structure_area',
'isad_conditions_of_access_use_area',
'isad_allied_materials_area',
'isad_notes_area',
'isad_access_points_area',
'isad_description_control_area',
];
// Add visibility settings
foreach ($elements as $item) {
$setting = new QubitSetting();
$setting->name = $item;
$setting->scope = 'element_visibility';
$setting->value = 1;
$setting->culture = 'en';
$setting->save();
}
return true;
}
}