Add "Other" structure type configuration.
This commit is contained in:
parent
e7b96ada2e
commit
076649172d
|
@ -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)
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
langcode: en
|
||||
status: true
|
||||
dependencies:
|
||||
enforced:
|
||||
module:
|
||||
- farm_structure
|
||||
id: other
|
||||
label: Other
|
|
@ -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();
|
||||
}
|
Loading…
Reference in New Issue