ca1e02c9864fda97bf97f4c6f4d1246075597a12
[yaffs-website] / web / core / modules / system / system.api.php
1 <?php
2
3 /**
4  * @file
5  * Hooks provided by the System module.
6  */
7
8 use Drupal\Core\Url;
9
10 /**
11  * @addtogroup hooks
12  * @{
13  */
14
15 /**
16  * Alters theme operation links.
17  *
18  * @param $theme_groups
19  *   An associative array containing groups of themes.
20  *
21  * @see system_themes_page()
22  */
23 function hook_system_themes_page_alter(&$theme_groups) {
24   foreach ($theme_groups as $state => &$group) {
25     foreach ($theme_groups[$state] as &$theme) {
26       // Add a foo link to each list of theme operations.
27       $theme->operations[] = [
28         'title' => t('Foo'),
29         'url' => Url::fromRoute('system.themes_page'),
30         'query' => ['theme' => $theme->getName()],
31       ];
32     }
33   }
34 }
35
36 /**
37  * @} End of "addtogroup hooks".
38  */