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.
Updated: Comment #0
Problem/Motivation
Routing system is a new big thing so it is time to convert info file configure link to route name.
Proposed resolution
Convert info file configure link to route name.
Remaining tasks
Discussion and patch
Related code in \Drupal\system\Form\ModulesListForm
// Generate link for module's configuration page, if it has one.
$row['links']['configure'] = array();
if ($module->status && isset($module->info['configure'])) {
if (($configure = menu_get_item($module->info['configure'])) && $configure['access']) {
$row['links']['configure'] = array(
'#type' => 'link',
'#title' => $this->t('Configure'),
'#href' => $configure['href'],
'#options' => array('attributes' => array('class' => array('module-link', 'module-link-configure'), 'title' => $configure['description'])),
);
}
}
User interface changes
None
API changes
I don't think it is an api change.
Related Issues
https://drupal.org/project/issues/search/drupal?issue_tags=WSCCI-conversion
Comment | File | Size | Author |
---|---|---|---|
#15 | configure-route-2089511-15.patch | 14.11 KB | tim.plunkett |
#15 | interdiff.txt | 1.14 KB | tim.plunkett |
#15 | Screen Shot 2013-10-03 at 3.58.49 PM.png | 17.43 KB | tim.plunkett |
#12 | drupal8.routing-system.2089511-12.patch | 14.04 KB | RoSk0 |
#12 | interdiff-2089511-8-12.txt | 323 bytes | RoSk0 |
Comments
Comment #1
RoSk0Lets rock!
Comment #2
RoSk0Initial patch.
Comment #3
RoSk0Forget to mention - I removed 'configure' link for toolbar module, there is no route for it and looks like this was added accidentally.
Comment #5
dawehnerWe should not change the title
Comment #6
RoSk0Fixed review comments.
Comment #8
dawehnerWhat happened here? Oh I see, there is no configuration available for toolbar.
You seem to have changed the used route name...
Comment #9
RoSk0Reroll.
Comment #11
dawehnerHave a look at my review...
Comment #12
RoSk0Fixed review comments and rerolled.
Comment #13
tim.plunkettI manually reviewed each path/route_name replacement, looks good!
Comment #14
alexpottAre
$configure['description']
and$module->info['description']
really equivalent? I don't think so.Comment #15
tim.plunkettYou're 100% right. HEAD uses the description of the menu link it points to, this patch uses the module description (which is already visible on the page).
I think we could chose to skip this completely, since its just a title text on a link in a collapsed details element, but if we want to keep it this is how.
Comment #16
jibranAwesome catch by @alexpott and nice fix by @tim.plunkett back to RTBC.
Comment #17
webchickThis seems consistent with our use of routes over paths elsewhere.
Committed and pushed to 8.x. Thanks!
This'll need a change notice.
Comment #18
jibranCreated https://drupal.org/node/2107171.
Comment #19
xjmI moved @jibran's change notice into the main one:
https://drupal.org/node/1935708#configure
Comment #21
Xano#2147689: [regression] Support route parameters for *info.yml files' "configure" route name tries to fix a small regression that was introduced by this issue.