API page: https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Menu%21Lo...

Two problems:

1. 'for the current route' means 'the route the user is on right now'. But this method has a $route_name parameter which is surely not needed if it's for the current route. The description is wrong.

2. This should say something more precise than 'Collects'. In particular, we should differentiate this from LocalTaskManager::getLocalTasksForRoute(), which loads plugin definitions, while this method gets render arrays. So 'Renders local tasks' would be clearer.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim created an issue. See original summary.

c.nish2k3’s picture

"Renders local tasks for the route name" - Will this be more appropriate?

hardikpandya’s picture

Applied Patch.

hardikpandya’s picture

Status: Active » Needs review

Needs Review.

joachim’s picture

I'd say 'for the given route', rather than 'route name'. We're rendering tasks for the route; the route name is just how it's identified.

Sorry, meant to reply to this before a patch had been made!

hardikpandya’s picture

Adding patch as suggested.

c.nish2k3’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for patch. Looks good.

Gábor Hojtsy’s picture

Title: docs for LocalTaskManager::getLocalTasks() are unclear » Documentation for LocalTaskManager::getLocalTasks() is incorrect

  • Gábor Hojtsy committed 8431b6c on 8.3.x
    Issue #2876428 by hardik.p, joachim, c.nish2k3: Documentation for...

  • Gábor Hojtsy committed 582208f on 8.4.x
    Issue #2876428 by hardik.p, joachim, c.nish2k3: Documentation for...
Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, this was not just unclear, but it was incorrect. Thanks for the fix!

Status: Fixed » Closed (fixed)

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