Problem/Motivation

Main info from parent issue:

Use of theme functions is discouraged in D8 and removed in D9 in favor of using Twig templates.

All theme function in includes/fivestar.theme.inc should be replaced by templates in templates/ and hook_theme() should be modified to use these templates.

Proposed resolution

Move static element theme output into twig template

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

V.Hilkov created an issue. See original summary.

V.Hilkov’s picture

FileSize
2.4 KB

Here is patch, which replaces static element theme function with twig template

V.Hilkov’s picture

Forgot to add template, here is patch with twig template

V.Hilkov’s picture

Renrhaf’s picture

Title: Move static element theme output into twig templete » Move static element theme output into twig template
Renrhaf’s picture

Status: Active » Reviewed & tested by the community

+1 RTBC

init90’s picture

Thanks for the work here!

I've updated the patch according to the coding standards and remove 'is_form' check as is not used in current implementation.
In next few days I'll plan to commit it.

TR’s picture

Might be good to finish this before making the changes in #3190556: Illegal choice 0 in field_fivestar element for fivestar widget?

init90’s picture

  • init90 committed 05a783d on 8.x-1.x authored by V.Hilkov
    Issue #3186838 by init90, V.Hilkov, Renrhaf, TR: Move static element...
init90’s picture

Status: Reviewed & tested by the community » Fixed

Committed! Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.