Skip to content
Snippets Groups Projects

Issue #3183734 by guillaumeg, joseph.olstad: Unable to use inline styles when...

Open Issue #3183734 by guillaumeg, joseph.olstad: Unable to use inline styles when...
1 unresolved thread
Open Joseph Olstad requested to merge issue/message-3183734:3183734-unable-to-use into 8.x-1.x
1 unresolved thread

Issue #3183734 by guillaumeg, joseph.olstad: Unable to use inline styles when tokens are used in a message (patch provided)

Closes #3183734

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
308 308 ];
309 309
310 310 foreach ($output as $key => $value) {
311 $output[$key] = \Drupal::token()
312 ->replace($value, ['message' => $this], $options);
311 // Make sure $value is still a Markup objet by creating it explicitly, as
312 // function token replace will return a string if the token was replaced.
313 // If returned value is already an object that implements MarkupInterface
314 // it is returned unchanged. See create($string) in MarkupTrait.php.
  • Comment on lines +311 to +314

    I think we could improve the documentation a little:

    Suggested change
    311 // Make sure $value is still a Markup objet by creating it explicitly, as
    312 // function token replace will return a string if the token was replaced.
    313 // If returned value is already an object that implements MarkupInterface
    314 // it is returned unchanged. See create($string) in MarkupTrait.php.
    311 // Make sure $value is still a Markup object by creating it explicitly, as
    312 // the token replace method will return a string if the token was replaced.
    313 // If the returned value is already an object that implements MarkupInterface
    314 // it is returned unchanged. See: \Drupal\Component\Render\MarkupTrait::create.
  • Please register or sign in to reply
  • Steven Ayers added 4 commits

    added 4 commits

    Compare with previous version

  • Steven Ayers added 6 commits

    added 6 commits

    Compare with previous version

  • Steven Ayers added 2 commits

    added 2 commits

    • dbaa6c6e - 1 commit from branch project:8.x-1.x
    • e73c6b8e - Merge branch message:8.x-1.x into 3183734-unable-to-use

    Compare with previous version

  • Steven Ayers added 2 commits

    added 2 commits

    • a3c2553d - 1 commit from branch project:8.x-1.x
    • 6c42333e - Merge branch message:8.x-1.x into 3183734-unable-to-use

    Compare with previous version

  • Please register or sign in to reply
    Loading