Skip to content
Snippets Groups Projects
Select Git revision
  • d25a77e0ec33bcdc3a2dbf36edf3238999102441
  • 11.x default protected
  • 11.2.x protected
  • 10.5.x protected
  • 10.6.x protected
  • 11.1.x protected
  • 10.4.x protected
  • 11.0.x protected
  • 10.3.x protected
  • 7.x protected
  • 10.2.x protected
  • 10.1.x protected
  • 9.5.x protected
  • 10.0.x protected
  • 9.4.x protected
  • 9.3.x protected
  • 9.2.x protected
  • 9.1.x protected
  • 8.9.x protected
  • 9.0.x protected
  • 8.8.x protected
  • 10.5.1 protected
  • 11.2.2 protected
  • 11.2.1 protected
  • 11.2.0 protected
  • 10.5.0 protected
  • 11.2.0-rc2 protected
  • 10.5.0-rc1 protected
  • 11.2.0-rc1 protected
  • 10.4.8 protected
  • 11.1.8 protected
  • 10.5.0-beta1 protected
  • 11.2.0-beta1 protected
  • 11.2.0-alpha1 protected
  • 10.4.7 protected
  • 11.1.7 protected
  • 10.4.6 protected
  • 11.1.6 protected
  • 10.3.14 protected
  • 10.4.5 protected
  • 11.0.13 protected
41 results

system.api.php

Blame
  • xjm's avatar
    Issue #2776975 by joelpittet, dawehner, tim.plunkett, xjm, pfrenssen: March 3,...
    Jess authored
    Issue #2776975 by joelpittet, dawehner, tim.plunkett, xjm, pfrenssen: March 3, 2017: Convert core to array syntax coding standards for Drupal 8.3.x RC phase
    52e3eec6
    History
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    system.api.php 719 B
    <?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[] = [
            'title' => t('Foo'),
            'url' => Url::fromRoute('system.themes_page'),
            'query' => ['theme' => $theme->getName()]
          ];
        }
      }
    }
    
    /**
     * @} End of "addtogroup hooks".
     */