Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By Gábor Hojtsy on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.0.x
Introduced in version:
8.0.0-beta13
Issue links:
Description:
All three menu links classes supported a title_arguments
key earlier which allowed providing a list of translation arguments (eg. @count) as part of the plugin definition. That raised caching concerns because it would of course depend on dynamic data (and possibly even an external object or more external objects) and was therefore removed.
If you need a title for any LocalActionDefault
, LocalTaskDefault
and ContextualLinkDefault
derivatives, use StringTranslationTrait
and pass in dynamic arguments appropriately, see https://www.drupal.org/node/2540342
Impacts:
Module developers