function RecipeIsApplyingTestSubscriber::onRecipeApplied
Records the isApplying flag when the recipe's applied event is triggered.
Parameters
\Drupal\Core\Recipe\RecipeAppliedEvent $event: The recipe applied event.
File
-
core/
modules/ system/ tests/ modules/ recipe_is_applying_test/ src/ EventSubscriber/ RecipeIsApplyingTestSubscriber.php, line 40
Class
- RecipeIsApplyingTestSubscriber
- Records the isApplying flag when recipe-provided configuration is saved.
Namespace
Drupal\recipe_is_applying_test\EventSubscriberCode
public function onRecipeApplied(RecipeAppliedEvent $event) : void {
if ($event->recipe->name === 'Recipe isApplying test') {
$this->keyValueFactory
->get('recipe_is_applying_test')
->set('recipe_applied_event', RecipeRunner::isApplying());
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.