Skip to content

Commit 4f21068

Browse files
committed
IBX-9060: Refactored after CR
1 parent 8be85af commit 4f21068

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

src/bundle/Resources/views/themes/admin/notification/system_notification.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{% extends template_to_extend %}
1+
{% extends base_template %}
22

33
{% trans_default_domain 'ibexa_notification' %}
44

src/lib/SystemNotification/SystemNotificationRenderer.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ public function __construct(
4747

4848
public function render(Notification $notification): string
4949
{
50-
$templateToExtend = '@ibexadesign/account/notifications/list_item.html.twig';
50+
$baseTemplate = '@ibexadesign/account/notifications/list_item.html.twig';
5151

5252
$currentRequest = $this->requestStack->getCurrentRequest();
5353
if ($currentRequest !== null && $currentRequest->attributes->getBoolean('render_all')) {
54-
$templateToExtend = '@ibexadesign/account/notifications/list_item_all.html.twig';
54+
$baseTemplate = '@ibexadesign/account/notifications/list_item_all.html.twig';
5555
}
5656

5757
return $this->twig->render(
@@ -62,7 +62,7 @@ public function render(Notification $notification): string
6262
'content' => $notification->data[self::KEY_CONTENT] ?? null,
6363
'subject' => $notification->data[self::KEY_SUBJECT] ?? null,
6464
'created_at' => $notification->created,
65-
'template_to_extend' => $templateToExtend,
65+
'base_template' => $baseTemplate,
6666
]
6767
);
6868
}
@@ -81,11 +81,11 @@ public function generateUrl(Notification $notification): ?string
8181

8282
public function getTypeLabel(): string
8383
{
84-
return /** @Desc("System notification") */
85-
$this->translator->trans(
86-
'notifications.notification.system.label',
87-
[],
88-
'ibexa_notifications'
89-
);
84+
return $this->translator->trans(
85+
/** @Desc("System notification") */
86+
'notifications.notification.system.label',
87+
[],
88+
'ibexa_notifications'
89+
);
9090
}
9191
}

0 commit comments

Comments
 (0)