I'm trying to add a new entity to my email templates so I have: 1) I created a new plugin with my custom entity
$connection->executeQuery('
CREATE TABLE IF NOT EXISTS `my_entity` (
`id` BINARY(16) NOT NULL,
`message` VARCHAR(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
');
2) I have added the first row in this column:
id | name
bin... | test
3) I edit this record in db: mail_template_type
column available_entities
{"order":"order","salesChannel":"sales_channel","myEntity":"my_entity"}
And now when I edit the email, twig tells me that there is such a variable to use, but when I use it, there is nothing in it {{ myEntity.name }}
Can I have a clear explanation, how can I do that?