Problem/Motivation

TokenProcessorTrait is a strange solution. As a trait, it interferes with the functions of the class it's used in, and they can't both act in the same phase. The class and trait end up sharing protected members, when there's really no need for it. They are forced to share the same weight.

Secondly, with the old mailsystem, tokens were almost always replaced prior to rendering. The token replacement occurred in hook_mail() and any rendering was only in the mail plug-in. It feels better, and potentially safer to match that if possible.

Proposed resolution

Convert the trait to a class TokenProcessor. Try to replace token at the end of the build phase if possible.

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

adamps created an issue. See original summary.

adamps’s picture

Issue summary: View changes
adamps’s picture

Issue summary: View changes

  • adamps committed 1238b1e6 on 2.x
    Issue #3526980 by adamps: Convert TokenProcessorTrait to TokenProcessor
    
adamps’s picture

Status: Active » Fixed
adamps’s picture

Issue tags: +Needs change record

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.