Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 299604

Add MenuLinkInterface::getAdminLabel()

$
0
0

Problem/Motivation

We currently have hard-coded hacks like this in MenuForm:

        elseif (($url = $link->getUrlObject()) && $url->isRouted() && $url->getRouteName() == 'user.page') {
          $form[$id]['title']['#suffix'] = ' (' . $this->t('logged in users only') . ')';
        }

This means contrib/custom menu links aren't able to do this without some heaving form altering.

See #2503755-86: Switch from user login block to login menu link and search block in standard profile and #2503755-87: Switch from user login block to login menu link and search block in standard profile.2.

Proposed resolution

Allow menu link plugins to specify admin labels.

Remaining tasks

TBD

User interface changes

None.

API changes

API addition.

Data model changes

None.


Viewing all articles
Browse latest Browse all 299604

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>