Skip to content
Snippets Groups Projects
Commit 351609bd authored by Adam Shepherd's avatar Adam Shepherd
Browse files

Issue #3262882 by AdamPS: Policy importing (extra patch)

parent 7111b569
No related branches found
No related tags found
No related merge requests found
......@@ -19,8 +19,8 @@ use Drupal\symfony_mailer\Processor\TokenProcessorTrait;
* "validate" = @Translation("Validate"),
* },
* common_adjusters = {"email_subject", "email_body"},
* migrate = @Translation("Simplenews subscriber settings"),
* migrate_warning = @Translation("This overrides the default HTML messages with imported plain text versions."),
* import = @Translation("Simplenews subscriber settings"),
* import_warning = @Translation("This overrides the default HTML messages with imported plain text versions."),
* )
*/
class SimplenewsEmailBuilder extends EmailProcessorBase implements MailerPolicyImportInterface {
......
......@@ -21,7 +21,7 @@ use Symfony\Component\Mime\Address;
* },
* has_entity = TRUE,
* common_adjusters = {"email_subject", "email_from"},
* migrate = @Translation("Simplenews newsletter settings"),
* import = @Translation("Simplenews newsletter settings"),
* )
*
* @todo Notes for adopting Symfony Mailer into simplenews. Can remove the
......
......@@ -100,14 +100,14 @@ class EmailBuilderManager extends DefaultPluginManager implements EmailBuilderMa
$state_all = $this->keyValue->get('import', []);
foreach ($this->getDefinitions() as $id => $definition) {
if ($definition['migrate']) {
if ($definition['import']) {
$state = $state_all[$id] ?? self::IMPORT_READY;
$info[$id] = [
'name' => "$definition[migrate] ($id)",
'name' => "$definition[import] ($id)",
'state' => $state,
'state_name' => $this->stateName[$state],
'warning' => $definition['migrate_warning'] ?? NULL,
'warning' => $definition['import_warning'] ?? NULL,
];
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment