Skip to content
Snippets Groups Projects
Commit 355aa03e authored by Yash Rode's avatar Yash Rode Committed by Ted Bowman
Browse files

Issue #3328765 by yash.rode, tedbow: Throw an exception in...

Issue #3328765 by yash.rode, tedbow: Throw an exception in Beginner::setStageManipulator() if it is already set
parent ef4f24bc
No related branches found
No related tags found
1 merge request!633Issue #3328765: Throw an exception in setStageManipulator if it is already set
......@@ -37,6 +37,9 @@ class Beginner extends BypassedStagerServiceBase implements BeginnerInterface {
* The manipulator.
*/
public static function setStageManipulator(StageFixtureManipulator $manipulator): void {
if (\Drupal::state()->get(__CLASS__ . '-stage-manipulator')) {
throw new \Exception('Stage manipulator already set.');
}
\Drupal::state()->set(__CLASS__ . '-stage-manipulator', $manipulator);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment