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

Lazy-load Attribute objects later in the rendering process only if needed

$
0
0

Problem/Motivation

Currently there is no way to know when HTML attributes arrays (i.e. attributes, title_attributes, content_attributes, etc.) should be cast to Attribute objects. template_preprocess(), for example, creates three Attribute objects, but the template to be rendered may not use any of them.

Proposed resolution

Instantiate Attribute objects in a consistent fashion and/or location. Since the main benefit of the Attribute class is only printing the attributes once, consider moving all instantiation of Attribute objects to as late as possible in the rendering process.

Remaining tasks

TBD

User interface changes

n/a

API changes

TBD

#1982018: [meta] Refactor template_preprocess()
#1757550: [meta] Convert core theme functions and templates to Twig


Viewing all articles
Browse latest Browse all 313873

Trending Articles



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