Replace tokens in eca_workflow_transition revision_log
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
Write a patchReview and feedbackRTBC and feedbackCommit to 2.1.x- 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