You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
629 B
28 lines
629 B
<?php |
|
|
|
/** |
|
* @file |
|
* Install/update hook implementations. |
|
*/ |
|
|
|
|
|
|
|
use Drupal\taxonomy\Entity\Term; |
|
use Drupal\field\Entity\FieldConfig; |
|
|
|
/** |
|
* Implements hook_install(). |
|
*/ |
|
function islandora_fits_install() { |
|
$term_name = 'FITS File'; |
|
$test_terms = taxonomy_term_load_multiple_by_name($term_name); |
|
if (!$test_terms) { |
|
$term = Term::create([ |
|
'parent' => [], |
|
'name' => $term_name, |
|
'vid' => 'islandora_media_use', |
|
'description' => 'Technical Metadata associated with an original media file', |
|
'field_external_uri' => ['uri' => 'https://projects.iq.harvard.edu/fits'], |
|
])->save(); |
|
} |
|
}
|
|
|