In #663946: Merge "List links" page into "Edit menu" page β it was proposed that the resulting merged form does not have the "add item" action button at the top at the standard place, but inside the page. That is a non-standard place for action buttons and required to work around the action button system and apply styling only to a strategically formatter action link. While the immediate usability of the form improved a great deal, the action link is not anymore programatically discoverable. There are certainly better ways to solve this if we introduce higher level rendering solutions for action links. The patch used this:
// Inline the "Add link" action so it displays right above the table of
// links. No access check needed, since this form has the same access
// restriction as adding menu items to the menu.
$form['inline_actions'] = array(
'#prefix' => '<ul class="action-links">',
'#suffix' => '</ul>',
);
$form['inline_actions']['add'] = array(
'#theme' => 'menu_local_action',
'#link' => array(
'href' => 'admin/structure/menu/manage/' . $form_state['menu']->id() . '/add',
'title' => t('Add link'),
),
);
And then later in the theme function:
$output .= drupal_render($form['inline_actions']);
This is because there is no element for menu local actions to be used.
Active
11.0 π₯
Refactors an existing API or subsystem for consistency, performance, modularization, flexibility, third-party integration, etc. May imply an API change. Frequently used during the Code Slush phase of the release cycle.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.