Skip to content

Commit

Permalink
Install hook for cache clear
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Jan 6, 2025
1 parent c3fcd36 commit 9649ca5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ type: module
description: 'Helper module for Summer website'
package: Stanford
core_version_requirement: ^10 || ^11
dependencies:
- scheduler:scheduler
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
* summer_helper.install
*/

/**
* Implements hook_install().
*/
function summer_helper_install() {
\Drupal::service('scheduler.manager')->invalidatePluginCache();
}

/**
* Move card background image behavior settings.
*/
Expand Down Expand Up @@ -40,9 +47,11 @@ function summer_helper_update_9002() {
* Install new summer entity type.
*/
function summer_helper_update_9003() {
$press_type = \Drupal::entityTypeManager()->getDefinition('summer_entity_type');
\Drupal::entityDefinitionUpdateManager()->installEntityType($press_type);
\Drupal::service('scheduler.manager')->invalidatePluginCache();
$summer_type = \Drupal::entityTypeManager()
->getDefinition('summer_entity_type');
\Drupal::entityDefinitionUpdateManager()->installEntityType($summer_type);

$press_entity = \Drupal::entityTypeManager()->getDefinition('summer_entity');
\Drupal::entityDefinitionUpdateManager()->installEntityType($press_entity);
$summer_entity = \Drupal::entityTypeManager()->getDefinition('summer_entity');
\Drupal::entityDefinitionUpdateManager()->installEntityType($summer_entity);
}

0 comments on commit 9649ca5

Please sign in to comment.