# Controller überschreiben

**URL:** <https://forum.shopware.com/t/controller-uberschreiben/22691>\
**Category:** Shopware 3.5\
**Tags:** programming\
**Created:** [30. September 2014 um 18:54 UTC](https://forum.shopware.com/t/controller-uberschreiben/22691 "2014-09-30T18:54:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TAiS46](https://avatars.discourse-cdn.com/v4/letter/t/82dd89/32.png) [@TAiS46](https://forum.shopware.com/u/TAiS46)\
**Post date:** [30. September 2014 um 18:54 UTC](https://forum.shopware.com/t/controller-uberschreiben/22691/1 "2014-09-30T18:54:39Z")

</div>

Hallo, ich versuche in der Detail.php die ratingAction Funktion zu überschreiben, allerdings gelingt mir das nicht ganz. Kann mir jemand ein simples Beispiel geben für ein Plugin? Mit folgendem Code fange ich den Post vom Rating ab ` $this-\>subscribeEvent( 'Enlight\_Controller\_Action\_Frontend\_Detail\_rating', 'replaceGetArticleById' );` Aber wie ersetze ich jetzt die ratingAction? (Fehler Prüfung etc) Edit: ` $this-\>subscribeEvent( 'Shopware\_Controllers\_Frontend\_Detail::ratingAction::replace', 'replaceGetArticleById' );` Und dann entsprechend ` public function replaceGetArticleById(Enlight\_Event\_EventArgs $arguments) { //Code }` brachte die Lösung!
