| 1 | <?php |
||
| 17 | class NodeMessage implements MessageInterface |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * Message type. |
||
| 21 | * |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | protected $type; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Node. |
||
| 28 | * |
||
| 29 | * @var NodeInterface |
||
| 30 | */ |
||
| 31 | protected $node; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Template handler. |
||
| 35 | * |
||
| 36 | * @var TemplateHandler |
||
| 37 | */ |
||
| 38 | protected $template; |
||
| 39 | |||
| 40 | /** |
||
| 41 | * Constructor. |
||
| 42 | */ |
||
| 43 | public function __construct(string $type, TemplateHandler $template, NodeInterface $node) |
||
| 49 | |||
| 50 | /** |
||
| 51 | * {@inheritdoc} |
||
| 52 | */ |
||
| 53 | public function getSubject(User $user): string |
||
| 60 | |||
| 61 | /** |
||
| 62 | * {@inheritdoc} |
||
| 63 | */ |
||
| 64 | public function getBody(User $user): string |
||
| 71 | |||
| 72 | /** |
||
| 73 | * {@inheritdoc} |
||
| 74 | */ |
||
| 75 | public function renderTemplate(string $template, User $user): string |
||
| 82 | } |
||
| 83 |