Add "Other" structure type configuration.

This commit is contained in:
Michael Stenta 2022-01-09 23:29:03 -05:00
parent e7b96ada2e
commit 076649172d
3 changed files with 35 additions and 0 deletions

View File

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- "Other" Structure type
- [Open the Gin toolbar by default #470](https://github.com/farmOS/farmOS/pull/470)
- [Enforce that the changelog is updated with every pull request #469](https://github.com/farmOS/farmOS/pull/469)

View File

@ -0,0 +1,8 @@
langcode: en
status: true
dependencies:
enforced:
module:
- farm_structure
id: other
label: Other

View File

@ -0,0 +1,26 @@
<?php
/**
* @file
* Post update hooks for the farm_structure module.
*/
use Drupal\farm_structure\Entity\FarmStructureType;
/**
* Add "Other" structure type configuration.
*/
function farm_structure_post_update_add_other_structure_type(&$sandbox) {
$type = FarmStructureType::create([
'id' => 'other',
'label' => 'Other',
'dependencies' => [
'enforced' => [
'module' => [
'farm_structure',
]
]
],
]);
$type->save();
}