- 🇬🇧United Kingdom joachim
I don't understand what's going on with this issue.
The IS and patch #12 say that this is about documentation and patch 12 is a fix to api.php documentation.
Then patch 14 is TOTALLY different and changes a test!!!
Also, I did a quick test, and BOTH ways of setting a class work:
function toolbar_toolbar() { // The 'Home' tab is a simple link, with no corresponding tray. $items['home'] = [ '#type' => 'toolbar_item', 'tab' => [ '#type' => 'link', '#title' => t('Back to site'), '#url' => Url::fromRoute('<front>'), '#attributes' => [ 'title' => t('Return to site content'), 'class' => ['toolbar-icon', 'toolbar-icon-escape-admin'], 'data-toolbar-escape-admin' => TRUE, ], '#options' => [ 'attributes' => [ 'title' => t('Home page'), 'class' => ['toolbar-icon', 'toolbar-icon-THIS-WORKS-TOO-and-overrides-#attributes'], ], ], ],
Though the docs should reflect what is current usage, which is what patch #12 is doing.