Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291053

Rename RenderWrapper, and turn temporary shiv into a more elegant solution (if necessary)

$
0
0

Follow-up from #2004286: Defer calls to drupal_get_* functions until printed inside a template by adding a RenderWrapper class

At DrupalCamp Colorado today we were talking about the naming and architecture of this thing. RenderWrapper is pretty ambiguous, and the fact that it takes a callback as an argument seems like bad design to @c4rl.

What about something like:

abstract class PresenterBase

TitlePresenter extends PresenterBase
MessagesPresenter extends PresenterBase
BreadcrumbsPresenter extends PresenterBase
HtmlHeadPresenter extends PresenterBase

Comment from @Cottser:

If drupal_get_head() and drupal_get_title() are the only things using this class in a month or three, maybe we can just ditch this class and rework those. Things are steadily heading in this direction but they are just not there yet. This class is kind of like a polyfill for late rendering :)

So longer term I do see this going away, but I see it as a necessary piece in removing the process layer in Drupal 8.

Edit: I also worry that adding heavier architecture will make things slow, I'm looking at you Attribute.


Viewing all articles
Browse latest Browse all 291053

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>