first commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user