@@ -280,8 +280,8 @@ public function createVocabularyAction(NodeInterface $taxonomyRoot, $title, $des
280280
281281 $ vocabulary = $ taxonomyRoot ->createNodeFromTemplate ($ nodeTemplate );
282282
283- $ this ->flashMessageContainer -> addMessage (
284- new Message ( sprintf ('Created vocabulary %s at path %s ' , $ title , $ vocabulary ->getPath () ))
283+ $ this ->addFlashMessage (
284+ sprintf ('Created vocabulary %s at path %s ' , $ title , $ vocabulary ->getPath ())
285285 );
286286 $ this ->redirect ('index ' , null , null , ['root ' => $ taxonomyRoot ]);
287287 }
@@ -322,7 +322,9 @@ public function updateVocabularyAction(NodeInterface $vocabulary, $title, $descr
322322 $ vocabulary ->setProperty ('description ' , $ description );
323323 }
324324
325- $ this ->flashMessageContainer ->addMessage (new Message (sprintf ('Updated vocabulary %s ' , $ title )));
325+ $ this ->addFlashMessage (
326+ sprintf ('Updated vocabulary %s ' , $ title )
327+ );
326328 $ this ->redirect ('index ' , null , null , ['root ' => $ taxonomyRoot ]);
327329 }
328330
@@ -340,7 +342,9 @@ public function deleteVocabularyAction(NodeInterface $vocabulary)
340342 } else {
341343 $ path = $ vocabulary ->getPath ();
342344 $ vocabulary ->remove ();
343- $ this ->flashMessageContainer ->addMessage (new Message (sprintf ('Deleted vocabulary %s ' , $ path )));
345+ $ this ->addFlashMessage (
346+ sprintf ('Deleted vocabulary %s ' , $ path )
347+ );
344348 }
345349 $ taxonomyRoot = $ this ->taxonomyService ->getRoot ($ vocabulary ->getContext ());
346350 $ this ->redirect ('index ' , null , null , ['root ' => $ taxonomyRoot ]);
@@ -378,8 +382,8 @@ public function createTaxonomyAction(NodeInterface $parent, $title, $description
378382
379383 $ taxonomy = $ parent ->createNodeFromTemplate ($ nodeTemplate );
380384
381- $ this ->flashMessageContainer -> addMessage (
382- new Message ( sprintf ('Created taxonomy %s at path %s ' , $ title , $ taxonomy ->getPath () ))
385+ $ this ->addFlashMessage (
386+ sprintf ('Created taxonomy %s at path %s ' , $ title , $ taxonomy ->getPath ())
383387 );
384388
385389 $ flowQuery = new FlowQuery ([$ taxonomy ]);
@@ -437,7 +441,9 @@ public function updateTaxonomyAction(NodeInterface $taxonomy, $title, $descripti
437441 $ taxonomy ->setProperty ('description ' , $ description );
438442 }
439443
440- $ this ->flashMessageContainer ->addMessage (new Message (sprintf ('Updated taxonomy %s ' , $ taxonomy ->getPath ())));
444+ $ this ->addFlashMessage (
445+ sprintf ('Updated taxonomy %s ' , $ taxonomy ->getPath ())
446+ );
441447
442448 $ flowQuery = new FlowQuery ([$ taxonomy ]);
443449 $ vocabulary = $ flowQuery
@@ -466,7 +472,10 @@ public function deleteTaxonomyAction(NodeInterface $taxonomy)
466472
467473 $ taxonomy ->remove ();
468474
469- $ this ->flashMessageContainer ->addMessage (new Message (sprintf ('Deleted taxonomy %s ' , $ taxonomy ->getPath ())));
475+ $ this ->addFlashMessage (
476+ sprintf ('Deleted taxonomy %s ' , $ taxonomy ->getPath ())
477+ );
478+
470479 $ this ->redirect ('vocabulary ' , null , null , ['vocabulary ' => $ vocabulary ]);
471480 }
472481}
0 commit comments