likin’s picture

Status:Active» Needs review
1.29 KB

It has been converted.

steveoliver’s picture

With preprocess, I'm thinking something more like this. However, it seems I couldn't find a 'local task' this affects - the primary nav and the tabs for a node, for example, don't seem to be affected by this. Can anyone confirm this patch works for Stark?

killerpoke’s picture

Assigned:likin» killerpoke
killerpoke’s picture

Tested with Stark, works for me except one notice:

Notice: Indirect modification of overloaded element of Drupal\Core\Template\Attribute has no effect in template_preprocess_menu_local_task() (line 1682 of core/includes/

I'v fixed this according to the annotations in Drupal\Core\Template\Attribute.

killerpoke’s picture

Assigned:killerpoke» Unassigned
killerpoke’s picture

Issue tags:+drupal-at-twig

Add tag

mh86’s picture

Status:Needs review» Reviewed & tested by the community

Tested killerpoke's patch. PHP notice is gone now and rest looks good.
One small notice: inactive menu tasks have an empty class attribute now, but that's actually a different topic.

steveoliver’s picture

Title:Coverting theme_menu_local_task» Convert theme('menu_local_task') to Twig
Assigned:Unassigned» steveoliver
Status:Reviewed & tested by the community» Needs review
Issue tags:-drupal-at-twig+Twig

Updating title, tags; assigning myself.

steveoliver’s picture

Status:Needs review» Needs work

Updating status.

steveoliver’s picture

Status:Needs work» Fixed

Closing this (instead of moving it to core queue) in favor of aggregated '' core issue #1898478: - Convert theme_ functions to Twig. Git attributions to all participants will happen there.

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