On this page
function hook_system_themes_page_alter
hook_system_themes_page_alter(&$theme_groups)
Alters theme operation links.
Parameters
$theme_groups: An associative array containing groups of themes.
See also
system_themes_page()
Related topics
- Hooks
- Define functions that alter the behavior of Drupal core.
File
- core/modules/system/system.api.php, line 23
- Hooks provided by the System module.
Code
function hook_system_themes_page_alter(&$theme_groups) {
foreach ($theme_groups as $state => &$group) {
foreach ($theme_groups[$state] as &$theme) {
// Add a foo link to each list of theme operations.
$theme->operations[] = array(
'title' => t('Foo'),
'url' => Url::fromRoute('system.themes_page'),
'query' => array('theme' => $theme->getName())
);
}
}
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!system!system.api.php/function/hook_system_themes_page_alter/8.1.x