Follow-up to #1939092: Convert theme_mark() to Twig

Blocked on: #939462: Specific preprocess functions for theme hook suggestions are not invoked

Problem/Motivation

  • The mark theme hook is really just a "tag" with "attributes" and a "value" (one line, more or less, template)
  • The mark theme hook is not extensible (cannot add classes via a preprocess function, must override the template).

Proposed resolution

  • Convert all invocations of '#theme' => 'mark' to '#type' => 'html_tag__mark'
  • Move data logic from the template to a preprocess function.
  • Populate the attributes array with the correct classes (based on constants currently).

Remaining tasks

  • Create patch

User interface changes

None

API changes

Conversion of a theme hook into a different theme hook suggestion?

Comments

Cottser’s picture

Issue tags: -Twig conversion
Cottser’s picture

Version: 8.0.x-dev » 8.1.x-dev

We could potentially do this in a later 8.x.x release but I think it's too late for 8.0.x, bumping.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.