In this commit, I copied the code for processing the rendering of emails
from the current renderer.
This will allow us to use different base templates and styles.
Ideally, we should be able to add hooks and reuse the renderer from the engine namespace in
the current renderer.
[MAILPOET-5540]
One of the hardest problems in programming. Name changed to represent what the class is for now that we have removed the beacon. Hopefully.
[MAILPOET-5551]
When loading an email post in the editor we need to attach MailPoet
specific data like associated newsletter entity id, email type etc.
This is done using register_rest_field function.
So far we only send the associated entity ID but there is also a method `saveEmailData` that will
be used to save MailPoet specific email data.
[MAILPOET-5365]
The idea is that there is a core class
Mailpoet\MailPoet\EmailEditor\Core\EmailEditor which will contain common email editor related stuff
that can be used and shared between projects.
Mailpoet\MailPoet\EmailEditor\Integration\EmailEditor which contains MailPoet specific settings and and extra modifications
specific for MailPoet.
[MAILPOET-5365]
Until now we were using the same render() method and Twig templates for
the segments and lists pages. This commit separates them by creating two
different render() methods, one for each page, and also separing the
Twig templates. Only the translations remain shared as separating them
would be more involved and probably not worth it.
[MAILPOET-5392]
We want to remove/refactor the whole ModelValidator class as part of the
Doctrine refactor.
This commit moves the method ModelValidator::validateNonRoleEmail() to a
new Validator class as the method is not used by the validator system of
the Paris models. ModelValidator::validateEmail() was also moved as it
is called by ModelValidator::validateNonRoleEmail().
[MAILPOET-4343]