Skip to content

Commit

Permalink
Add post update hook to install the new quick_form entity type on exi…
Browse files Browse the repository at this point in the history
…sting farmOS installations #738
  • Loading branch information
wotnak authored and mstenta committed Oct 23, 2023
1 parent e41a348 commit e0ca16c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- [Fix planting quick form creating empty quantities #737](https://github.com/farmOS/farmOS/pull/737)
- [Add post update hook to install the new quick_form entity type on existing farmOS installations #738](https://github.com/farmOS/farmOS/pull/738)

## [2.2.1] 2023-10-09

Expand Down
15 changes: 15 additions & 0 deletions modules/core/quick/farm_quick.post_update.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

/**
* @file
* Post update hooks for the farmOS Quick Form module.
*/

/**
* Install the new quick_form entity type.
*/
function farm_quick_post_update_install_quick_form_entity_type(&$sandbox) {
\Drupal::entityDefinitionUpdateManager()->installEntityType(
\Drupal::entityTypeManager()->getDefinition('quick_form')
);
}

0 comments on commit e0ca16c

Please sign in to comment.