Replace tokens in eca_workflow_transition revision_log

Issue information

From user: mparker17

Related to !476 (merged)

Contribution record

Fork management

Problem/Motivation

In \Drupal\eca_content\Plugin\Action\SetNewRevision::execute(), we allow administrators to use tokens when setting the node's revision log message...

$log = $this->tokenService->replace($this->configuration['revision_log']);
if ($log instanceof DataTransferObject) {
  $log = $log->getString();
}
if ($log) {
  $entity->setRevisionLogMessage($log);
}

However, we don't do that in \Drupal\eca_workflow\Plugin\Action\WorkflowTransition::execute()...

$entity->setRevisionLogMessage($this->configuration['revision_log']);

Proposed resolution

Replace tokens in the revision_log message in \Drupal\eca_workflow\Plugin\Action\WorkflowTransition::execute()

Remaining tasks

  1. Write a patch
  2. Review and feedback
  3. RTBC and feedback
  4. Commit to 2.1.x
  5. Release

User interface changes

Add '#eca_token_replacement' => TRUE, to the form field \Drupal\eca_workflow\Plugin\Action\WorkflowTransition::buildConfigurationForm() so that the UI states that "This field supports tokens."

API changes

None.

Data model changes

None.

Edited by drupalbot
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information