Commit e0a39eb6 authored by adci_contributor's avatar adci_contributor
Browse files

Issue #3122162 by antongp: Get an error when trying to install Bibliography &...

Issue #3122162 by antongp: Get an error when trying to install Bibliography & Citation module on Drupal 9
parent 876d2c0c
......@@ -85,6 +85,7 @@
- [#3065955] by antongp: Improve Contributors (Admin) views
### Fixed
- [#3122162] by antongp: Get an error when trying to install Bibliography & Citation module on Drupal 9
- [#3121957] by antongp: Cannot add new reference type
- [#3120806] by antongp: Preview of a reference entity throws an error when entity is new and Bibliography & Citation - Export module and some of formats are installed
- [#3116100] by u_tiwari: Bibtex Encoder disregards `editor` key for use as Author with editor role when importing Bibtex content
......@@ -746,3 +747,4 @@ Add description to reference types, prefill it with sensible defaults. On refere
[#3116100]: https://www.drupal.org/node/3116100
[#3120806]: https://www.drupal.org/node/3120806
[#3121957]: https://www.drupal.org/node/3121957
[#3122162]: https://www.drupal.org/node/3122162
......@@ -35,3 +35,27 @@ function bibcite_update_8001() {
$config->clear('links');
$config->save(TRUE);
}
/**
* Add config_export property to CSL style config entity.
*/
function bibcite_update_8002() {
$definition_update_manager = \Drupal::entityDefinitionUpdateManager();
// Update CSL style entity.
$bibcite_csl_style = $definition_update_manager->getEntityType('bibcite_csl_style');
$bibcite_csl_style->set('config_export', [
'id',
'parent',
'label',
'csl',
'updated',
'custom',
'url_id',
'override',
'preview_mode',
'citekey_pattern',
'fields',
]);
$definition_update_manager->updateEntityType($bibcite_csl_style);
}
......@@ -1193,3 +1193,38 @@ function bibcite_entity_update_8025() {
}
}
}
/**
* Add config_export property to config entities.
*/
function bibcite_entity_update_8026() {
$definition_update_manager = \Drupal::entityDefinitionUpdateManager();
// Update Reference Type entity.
$bibcite_reference_type = $definition_update_manager->getEntityType('bibcite_reference_type');
$bibcite_reference_type->set('config_export', [
'id',
'label',
'description',
'new_revision',
]);
$definition_update_manager->updateEntityType($bibcite_reference_type);
// Update Contributor Role entity.
$bibcite_contributor_role = $definition_update_manager->getEntityType('bibcite_contributor_role');
$bibcite_contributor_role->set('config_export', [
'id',
'label',
'weight',
]);
$definition_update_manager->updateEntityType($bibcite_contributor_role);
// Update Contributor Category entity.
$bibcite_contributor_category = $definition_update_manager->getEntityType('bibcite_contributor_category');
$bibcite_contributor_category->set('config_export', [
'id',
'label',
'weight',
]);
$definition_update_manager->updateEntityType($bibcite_contributor_category);
}
......@@ -31,6 +31,11 @@ use Drupal\Core\Config\Entity\ConfigEntityBase;
* "edit-form" = "/admin/structure/bibcite/contributor/settings/category/{bibcite_contributor_category}",
* "delete-form" = "/admin/structure/bibcite/contributor/settings/category/{bibcite_contributor_category}/delete",
* "collection" = "/admin/structure/bibcite/contributor/settings/category"
* },
* config_export = {
* "id",
* "label",
* "weight",
* }
* )
*/
......
......@@ -31,6 +31,11 @@ use Drupal\Core\Config\Entity\ConfigEntityBase;
* "edit-form" = "/admin/structure/bibcite/contributor/settings/role/{bibcite_contributor_role}",
* "delete-form" = "/admin/structure/bibcite/contributor/settings/role/{bibcite_contributor_role}/delete",
* "collection" = "/admin/structure/bibcite/contributor/settings/role"
* },
* config_export = {
* "id",
* "label",
* "weight",
* }
* )
*/
......
......@@ -32,6 +32,16 @@ use Drupal\Core\Config\Entity\ConfigEntityBundleBase;
* "edit-form" = "/admin/structure/bibcite/reference/settings/types/{bibcite_reference_type}",
* "delete-form" = "/admin/structure/bibcite/reference/settings/types/{bibcite_reference_type}/delete",
* "collection" = "/admin/structure/bibcite/reference/settings/types"
* },
* config_export = {
* "id",
* "label",
* "description",
* "new_revision",
* "override",
* "preview_mode",
* "citekey_pattern",
* "fields",
* }
* )
*/
......
......@@ -34,6 +34,15 @@ use Drupal\Core\Entity\EntityStorageInterface;
* "edit-form" = "/admin/config/bibcite/settings/csl_style/{bibcite_csl_style}",
* "delete-form" = "/admin/config/bibcite/settings/csl_style/{bibcite_csl_style}/delete",
* "collection" = "/admin/config/bibcite/settings/csl_style"
* },
* config_export = {
* "id",
* "parent",
* "label",
* "csl",
* "updated",
* "custom",
* "url_id",
* }
* )
*/
......
Markdown is supported
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