This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
drupalcampbristol/web/core/modules/system/system.api.php
2017-02-13 15:31:17 +00:00

39 lines
729 B
PHP

<?php
/**
* @file
* Hooks provided by the System module.
*/
use Drupal\Core\Url;
/**
* @addtogroup hooks
* @{
*/
/**
* Alters theme operation links.
*
* @param $theme_groups
* An associative array containing groups of themes.
*
* @see system_themes_page()
*/
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())
);
}
}
}
/**
* @} End of "addtogroup hooks".
*/