class RecipeIsApplyingTestHooks

Hook implementations for recipe_is_applying_test.

Hierarchy

Expanded class hierarchy of RecipeIsApplyingTestHooks

File

core/modules/system/tests/modules/recipe_is_applying_test/src/Hook/RecipeIsApplyingTestHooks.php, line 15

Namespace

Drupal\recipe_is_applying_test\Hook
View source
class RecipeIsApplyingTestHooks {
  public function __construct(private KeyValueFactoryInterface $keyValueFactory) {
  }
  
  /**
   * Implements hook_modules_installed().
   */
  public function modulesInstalled(array $modules, bool $is_syncing) : void {
    $this->keyValueFactory
      ->get('recipe_is_applying_test')
      ->set('modules_installed', RecipeRunner::isApplying());
  }
  
  /**
   * Implements hook_themes_installed().
   */
  public function themesInstalled(array $theme_list) : void {
    $this->keyValueFactory
      ->get('recipe_is_applying_test')
      ->set('themes_installed', RecipeRunner::isApplying());
  }
  
  /**
   * Implements hook_ENTITY_TYPE_insert() for entity_test entities.
   */
  public function entityTestInsert(EntityInterface $entity) : void {
    $this->keyValueFactory
      ->get('recipe_is_applying_test')
      ->set('entity_test_insert', RecipeRunner::isApplying());
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.