Files
kupshop/bundles/KupShop/CommentsBundle/Email/AdminNotificationCommentEmail.php
2025-08-02 16:30:27 +02:00

36 lines
942 B
PHP

<?php
namespace KupShop\CommentsBundle\Email;
class AdminNotificationCommentEmail extends CommentEmail
{
protected static $name = 'Obchodníkovi při přidání komentáře';
protected static $type = 'COMMENT_NEW_ADMIN';
protected $subject = 'Nový komentář';
protected $template = 'email/email_comment_admin.tpl';
protected static $simpleComment = true;
public static function getPlaceholders()
{
$placeholders = [
'ODKAZ_ADMIN' => [
'text' => 'Odkaz (admin)',
],
];
return [self::$type => $placeholders] + (parent::getPlaceholders() ?? []);
}
public function replacePlaceholdersItem($placeholder)
{
switch ($placeholder) {
case 'ODKAZ_ADMIN':
return getAdminUrl('Comments', ['ID' => $this->comment->getId()]);
}
return parent::replacePlaceholdersItem($placeholder);
}
}