Created
November 23, 2016 08:42
-
-
Save dawehner/283fb5ab0dcd0ceefc88df9afc84e0ec to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@wimleers So what I was thinking was creating a render context, execute ```$item->processed``` in there, and then call ```$this->bubble($render_context->bubble());``` |
Ah! Yes, that's possible. Except in the case of $item->processed
already having been generated. Then the magic wouldn't happen again, and we wouldn't be able to catch the cacheability metadata.
Copied this discussion verbatim to https://www.drupal.org/node/2626924#comment-11795251, for future reference/to avoid linkrot.
Let's continue there.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
$Item->processed
is using the fieldapi magic, sorry, I should have made this clear.If you "call"
$item->processed
, its called out\Drupal\text\TextProcessed
to retrieve its value:\Drupal\text\TextProcessed::getValue
... which calls out tocheck_markup
, which renders it using::renderPlain
.So in case we would create a render context around this magic here, wouldn't we be able to catch the cacheability metadata from the render context?