You are here

at_theme_generator.module in AT Tools 8

File

at_theme_generator/at_theme_generator.module
View source
<?php

/**
 * @file
 * Contains at_theme_generator.module
 */

/**
 * Implements hook_help().
 * @param $route_name
 * @return string
 */
function at_theme_generator_help($route_name) {
  switch ($route_name) {
    case 'help.page.at_theme_generator':
      $output = '';
      $output .= '<h3>' . t('About') . '</h3>';
      $output .= '<br/>' . t('The <a href="@attools">AT Theme Generator</a> (packaged with AT Tools) allows you to generate new <a href="@at">Adaptivetheme</a> sub-themes and clone existing AT sub-themes.', array(
        '@attools' => 'https://www.drupal.org/project/at_tools',
        '@at' => 'https://www.drupal.org/project/adaptivetheme',
      ));
      $output .= '<br/>' . t('Please see the online documentation <a href="@docs">docs.adaptivethemes.com</a> for detailed instructions on how to use the theme generator.', array(
        '@docs' => '//docs.adaptivethemes.com/theme-generator/',
      ));
      return $output;
  }
}

/**
 * Prepares variables for appearance page templates.
 *
 * Default template: system-themes-page.html.twig.
 *
 * @param $variables
 *   An associative array containing:
 *   - theme_groups: An associative array containing groups of themes.
 *   - theme_group_titles: An associative array containing titles of themes.
 */
function at_theme_generator_preprocess_system_themes_page(&$variables) {
  $variables['#attached']['library'][] = 'at_theme_generator/appearance_settings';
}

Functions

Namesort descending Description
at_theme_generator_help Implements hook_help().
at_theme_generator_preprocess_system_themes_page Prepares variables for appearance page templates.