// than checking to see if the page exists, which is costly.
if ($this->moduleHandler->
moduleExists('help'
) &&
$module->status &&
$this->moduleHandler->
hasImplementations('help',
$module->
getName())) { $row['links'
]['help'
] =
[ '#type' => 'link',
'#title' =>
$this->
t('Help <span class="visually-hidden">for @module</span>',
['@module' =>
$module->info
['name'
]]),
'#url' => Url::
fromRoute('help.page',
['name' =>
$module->
getName()]),
'#options' =>
['attributes' =>
['class' =>
['module-link', 'module-link-help'
]]],
];
} // Generate link for module's permission, if the user has access to it.
if ($module->status &&
$this->currentUser->
hasPermission('administer permissions'
) &&
$this->permissionHandler->
moduleProvidesPermissions($module->
getName())) { $row['links'
]['permissions'
] =
[ '#type' => 'link',
'#title' =>
$this->
t('Permissions <span class="visually-hidden">for @module</span>',
['@module' =>
$module->info
['name'
]]),
'#url' => Url::
fromRoute('user.admin_permissions.module',
['modules' =>
$module->
getName()]),
'#options' =>
['attributes' =>
['class' =>
['module-link', 'module-link-permissions'
]]],
];
} // Generate link for module's configuration page, if it has one.
if ($module->status &&
isset($module->info
['configure'
])) { $route_parameters =
$module->info
['configure_parameters'
] ??
[];