1515use OxidEsales \ExamplesModule \Extension \Model \User as ExamplesModelUser ;
1616use OxidEsales \ExamplesModule \Extension \Model \UserInterface ;
1717use OxidEsales \ExamplesModule \Greeting \Service \GreetingMessageServiceInterface ;
18- use OxidEsales \ExamplesModule \Settings \Service \ ModuleSettingsServiceInterface ;
18+ use OxidEsales \ExamplesModule \Greeting \ Settings \GreetingSettingsInterface ;
1919use OxidEsales \ExamplesModule \Tracker \Infrastructure \Repository \TrackerRepositoryInterface ;
2020
2121use function PHPUnit \Framework \isInstanceOf ;
@@ -37,7 +37,7 @@ class GreetingController extends FrontendController
3737 protected $ _sThisTemplate = '@oe_examples_module/templates/greetingtemplate ' ;
3838
3939 public function __construct (
40- private readonly ModuleSettingsServiceInterface $ moduleSettings ,
40+ private readonly GreetingSettingsInterface $ greetingSettings ,
4141 private readonly TrackerRepositoryInterface $ trackerRepository ,
4242 private readonly GreetingMessageServiceInterface $ greetingService ,
4343 ) {
@@ -58,7 +58,7 @@ public function render()
5858 if (
5959 $ user instanceof UserInterface
6060 && !empty ($ user ->getId ())
61- && $ this ->moduleSettings ->isPersonalGreetingMode ()
61+ && $ this ->greetingSettings ->isPersonalGreetingMode ()
6262 ) {
6363 $ greeting = $ user ->getPersonalGreeting ();
6464 $ tracker = $ this ->trackerRepository ->getTrackerByUserId ($ user ->getId ());
@@ -83,7 +83,7 @@ public function updateGreeting(): void
8383 $ user = $ this ->getUser ();
8484
8585 /** @phpstan-ignore-next-line */
86- if (is_a ($ user , EshopModelUser::class) && $ this ->moduleSettings ->isPersonalGreetingMode ()) {
86+ if (is_a ($ user , EshopModelUser::class) && $ this ->greetingSettings ->isPersonalGreetingMode ()) {
8787 $ this ->greetingService ->saveGreeting ($ user );
8888 }
8989 }
0 commit comments