<?php

/**
 * @file
 * Functions to support theming in the SUBTHEME_NAME theme.
 */

/**
 * Implements hook_preprocess_html() for html.html.twig.
 *
 * @see core/includes/theme.inc
 */
function SUBTHEME_MACHINE_NAME_preprocess_html(&$variables) {
  // Add class to HTML tag.
  $variables['html_attributes']->addClass('no-js');
}

/**
 * Implements hook_preprocess_page() for page.html.twig.
 *
 * @see core/includes/theme.inc
 */
function SUBTHEME_MACHINE_NAME_preprocess_page(&$variables) {

  // Attached a specific CSS file for the homepage.
  if ($variables['is_front'] === TRUE) {
    $variables['#cache']['contexts'][] = 'url.path.is_front';
    $variables['#attached']['library'][] = 'SUBTHEME_MACHINE_NAME/homepage-styles';
  }
}

/**
 * Implements hook_page_attachments_alter() for page.html.twig.
 *
 * @see core/includes/theme.inc
 */
function SUBTHEME_MACHINE_NAME_page_attachments_alter(array &$attachments) {

  // Tell IE to use latest rendering engine (not to use compatibility mode).
  $ie_edge = [
    '#type' => 'html_tag',
    '#tag' => 'meta',
    '#weight' => -2000,
    '#attributes' => [
      'http-equiv' => 'X-UA-Compatible',
      'content' => 'IE=edge',
    ],
  ];

  $attachments['#attached']['html_head'][] = [$ie_edge, 'ie_edge'];
}

/**
 * Implements hook_preprocess_page_title() for page-title.html.twig.
 *
 * @see core/includes/theme.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_page_title(&$variables) {
} */

/**
 * Implements hook_preprocess_region() for region.html.twig.
 *
 * @see core/includes/theme.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_region(&$variables) {
} */

/**
 * Implements hook_preprocess_status_messages() for status-messages.html.twig.
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_status_messages(&$variables) {
} */

/**
 * Implements hook_preprocess_node() for region.html.twig.
 *
 * @see core/includes/theme.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_node(&$variables) {
} */

/**
 * Implements hook_preprocess_block() for block.html.twig.
 *
 * @see core/modules/block/block.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_block(&$variables) {
} */

/**
 * Implements hook_preprocess_block__system_branding_block() for block--system-branding-block.html.twig.
 *
 * @see core/modules/block/block.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_block__system_branding_block(&$variables) {
}*/

/**
 * Implements hook_preprocess_field() for field.html.twig.
 *
 * @see core/includes/theme.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_field(&$variables, $hook) {
} */

/**
 * Implements hook_preprocess_field_multiple_value_form() for field-multiple-value-form.html.twig.
 *
 * @see core/includes/theme.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_field_multiple_value_form(&$variables) {
} */

/**
 * Implements hook_preprocess_form() for form.html.twig.
 *
 * @see core/includes/form.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_form(&$variables) {
}

/**
 * Implements hook_preprocess_select() for select.html.twig.
 *
 * @see core/includes/form.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_select(&$variables) {
} */

/**
 * Implements hook_preprocess_fieldset() for fieldset.html.twig.
 *
 * @see core/includes/form.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_fieldset(&$variables) {
} */

/**
 * Implements hook_preprocess_radios() for radios.html.twig.
 *
 * @see core/includes/form.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_radios(&$variables) {
} */

/**
 * Implements hook_preprocess_checkboxes() for checkboxes.html.twig.
 *
 * @see core/includes/form.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_checkboxes(&$variables) {
} */

/**
 * Implements hook_preprocess_details() for details.html.twig.
 *
 * @see core/includes/form.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_details(&$variables) {
} */

/**
 * Implements hook_preprocess_textarea() for textarea.html.twig.
 *
 * @see core/includes/form.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_textarea(&$variables) {
} */

/**
 * Implements hook_preprocess_vertical_tabs() for vertical_tabs.html.twig.
 *
 * @see core/includes/form.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_vertical_tabs(&$variables) {
} */

/**
 * Implements hook_preprocess_input() for input.html.twig.
 *
 * @see core/includes/form.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_input(&$variables) {
} */

/**
 * Implements hook_preprocess_form_element() for form-element.html.twig.
 *
 * @see core/includes/form.inc
 */
/*function SUBTHEME_MACHINE_NAME_preprocess_form_element(&$variables) {
}*/

/**
 * Implements hook_preprocess_form_element_label() for form_element_label.html.twig.
 *
 * @see core/includes/form.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_form_element_label(&$variables) {];
} */

/**
 * Implements hook_preprocess_datetime_form() for datetime-form.html.twig.
 *
 * @see core/includes/theme.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_datetime_form(&$variables) {
} */

/**
 * Implements hook_preprocess_datetime_wrapper() for datetime-wrapper.html.twig.
 *
 * @see core/includes/theme.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_datetime_wrapper(&$variables) {
} */

/**
 * Implements hook_preprocess_time() for time.html.twig.
 *
 * @see core/includes/theme.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_time(&$variables) {
} */

/**
 * Implements hook_preprocess_breadcrumb() for breadcrumb.html.twig.
 *
 * @see core/includes/theme.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_breadcrumb(&$variables) {
} */

/**
 * Implements hook_preprocess_menu_local_tasks() for menu-local-tasks.html.twig.
 *
 * @see core/includes/menu.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_menu_local_tasks(&$variables) {
} */

/**
 * Implements hook_preprocess_menu_local_task() for menu-local-task.html.twig.
 *
 * @see core/includes/menu.inc
 */
/*function SUBTHEME_MACHINE_NAME_preprocess_menu_local_task(&$variables) {
}*/

/**
 * Implements hook_preprocess_menu_local_action() for menu-local-action.html.twig.
 *
 * @see core/includes/menu.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_menu_local_action(&$variables) {
} */

/**
 * Implements hook_preprocess_container() for container.html.twig.
 *
 * @see core/includes/theme.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_container(&$variables) {
} */

/**
 * Implements hook_preprocess_mark() for mark.html.twig.
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_mark(&$variables) {
}*/

/**
 * Implements hook_preprocess_item_list() for item-list.html.twig.
 *
 * @see core/includes/theme.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_item_list(&$variables) {
} */

/**
 * Implements hook_preprocess_image() for image.html.twig.
 *
 * @see core/includes/theme.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_image(&$variables) {
} */

/**
 * Implements hook_preprocess_table() for table.html.twig.
 *
 * @see core/includes/theme.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_table(&$variables) {
} */

/**
 * Implements hook_preprocess_links() for links.html.twig.
 *
 * @see core/includes/theme.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_links(&$variables) {
} */

/**
 * Implements hook_preprocess_pager() for pager.html.twig.
 *
 * @see core/includes/pager.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_pager(&$variables) {
} */

/**
 * Implements hook_preprocess_comment() for comment.html.twig.
 *
 * @see core/modules/comment/comment.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_comment(&$variables) {
} */

/**
 * Implements hook_preprocess_user() for user.html.twig.
 *
 * @see core/modules/user/user.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_user(&$variables) {
} */

/**
 * Implements hook_preprocess_username() for username.html.twig.
 *
 * @see core/modules/user/user.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_username(&$variables) {
} */

/**
 * Implements hook_preprocess_file_managed_file() for file-managed-file.html.twig.
 *
 * @see core/modules/file/file.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_file_managed_file(&$variables) {
} */

/**
 * Implements hook_preprocess_file_link() for file-link.html.twig.
 *
 * @see core/modules/file/file.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_file_link(&$variables) {
} */

/**
 * Implements hook_preprocess_taxonomy_term() for taxonomy-term.html.twig.
 *
 * @see core/modules/taxonomy/taxonomy.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_taxonomy_term(&$variables) {
} */

/**
 * Implements hook_preprocess_filter_guidelines() for filter-guidelines.html.twig.
 *
 * @see core/modules/filter/filter.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_filter_guidelines(&$variables) {
} */

/**
 * Implements hook_preprocess_filter_tips() for filter-tips.html.twig.
 *
 * @see core/modules/filter/filter.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_filter_tips(&$variables) {
} */

/**
 * Implements hook_preprocess_text_format_wrapper() for text-format-wrapper.html.twig.
 *
 * @see core/modules/filter/filter.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_text_format_wrapper(&$variables) {
} */

/**
 * Implements hook_preprocess_book_all_books_block() for book-all-books-block.html.twig.
 *
 * @see core/modules/book/book.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_book_all_books_block(&$variables) {
} */

/**
 * Implements hook_preprocess_book_navigation() for book-navigation.html.twig.
 *
 * @see core/modules/book/book.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_book_navigation(&$variables) {
} */

/**
 * Implements hook_preprocess_search_result() for search-result.html.twig.
 *
 * @see core/modules/search/search.pages.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_search_result(&$variables) {
} */

/**
 * Implements hook_preprocess_aggregator_item() for aggregator-item.html.twig.
 *
 * @see core/modules/aggregator/aggregator.theme.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_aggregator_item(&$variables) {
} */

/**
 * Implements hook_preprocess_aggregator_feed() for aggregator-feed.html.twig.
 *
 * @see core/modules/aggregator/aggregator.theme.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_aggregator_feed(&$variables) {
} */

/**
 * Implements hook_preprocess_forums() for forums.html.twig.
 *
 * @see core/modules/forum/forum.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_forums(&$variables) {
} */

/**
 * Implements hook_preprocess_forum_list() for forum-list.html.twig.
 *
 * @see core/modules/forum/forum.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_forum_list(&$variables) {
} */

/**
 * Implements hook_preprocess_forum_icon() for forum-icon.html.twig.
 *
 * @see core/modules/forum/forum.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_forum_icon(&$variables) {
} */

/**
 * Implements hook_preprocess_forum_submitted() for forum-submitted.html.twig.
 *
 * @see core/modules/forum/forum.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_forum_submitted(&$variables) {
} */

/**
 * Implements hook_preprocess_image_style() for image-style.html.twig.
 *
 * @see core/modules/image/image.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_image_style(&$variables) {
}
 */

/**
 * Implements hook_preprocess_responsive_image() for responsive-image.html.twig.
 *
 * @see core/modules/responsive_image/responsive_image.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_responsive_image(&$variables) {
} */

/**
 * Implements hook_preprocess_views_view() for views-view.html.twig.
 *
 * @see core/modules/views/views.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_views_view(&$variables) {
} */

/**
 * Implements hook_preprocess_views_view_fields() for views-view-fields.html.twig.
 *
 * @see core/modules/views/views.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_views_view_fields(&$variables) {
} */

/**
 * Implements hook_preprocess_views_view_grouping() for views-view-grouping.html.twig.
 *
 * @see core/modules/views/views.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_views_view_grouping(&$variables) {
} */

/**
 * Implements hook_preprocess_views_view_field() for views-view-field.html.twig.
 *
 * @see core/modules/views/views.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_views_view_field(&$variables) {
} */

/**
 * Implements hook_preprocess_views_view_summary() for views-view-summary.html.twig.
 *
 * @see core/modules/views/views.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_views_view_summary(&$variables) {
} */

/**
 * Implements hook_preprocess_views_view_summary_unformatted() for views-view-summary-unformatted.html.twig.
 *
 * @see core/modules/views/views.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_views_view_summary_unformatted(
&$variables
) {
} */

/**
 * Implements hook_preprocess_views_view_table() for views-view-table.html.twig.
 *
 * @see core/modules/views/views.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_views_view_table(&$variables) {
} */

/**
 * Implements hook_preprocess_views_view_grid() for views-view-grid.html.twig.
 *
 * @see core/modules/views/views.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_views_view_grid(&$variables) {
} */

/**
 * Implements hook_preprocess_views_view_unformatted() for views-view-unformatted.html.twig.
 *
 * @see core/modules/views/views.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_views_view_unformatted(&$variables) {
} */

/**
 * Implements hook_preprocess_views_view_list() for views-view-list.html.twig.
 *
 * @see core/modules/views/views.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_views_view_list(&$variables) {
} */

/**
 * Implements hook_preprocess_views_exposed_form() for views-exposed-form.html.twig.
 *
 * @see core/modules/views/views.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_views_exposed_form(&$variables) {
}*/

/**
 * Implements hook_preprocess_views_mini_pager() for views-mini-pager.html.twig.
 *
 * @see core/modules/views/views.module
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_views_mini_pager(&$variables) {
} */

/**
 * Implements hook_preprocess_maintenance_page() for maintenance-page.html.twig.
 *
 * @see core/includes/theme.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_maintenance_page(&$variables) {
} */

/**
 * Implements hook_preprocess_maintenance_task_list() for maintenance-task-list.html.twig.
 *
 * @see core/includes/theme.inc
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_maintenance_task_list(&$variables) {
} */

/**
 * Prepares variables for the Superfish menu superfish.html.twig template.
 *
 * @param array $variables
 *   An associative array containing:
 *   - element: An associative array containing the properties of the element.
 *     Properties used: #menu_name, #html_id, #settings, #tree
 *     - menu_name: Unique menu identifier.
 *     - html_id: Unique HTML ID.
 *     - settings: Menu block settings.
 *     - tree: The menu tree.
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_superfish(array &$variables) {
} */

/**
 * Prepares variables for superfish-menu-items.html.twig template.
 *
 * @param array $variables
 *   An associative array containing:
 *   - element: An associative array containing the properties of the element.
 *     Properties used: #tree, #settings, #cloned_parent
 *     - tree: The menu tree.
 *     - menu_name: Unique menu identifier.
 *     - settings: Block settings
 *     - cloned_parent: Cloned sub-menu parent link.
 */
/* function SUBTHEME_MACHINE_NAME_preprocess_superfish_menu_items(array &$variables) {
} */

/**
 * Alter CSS files before they are output on the page.
 *
 * @param array $css
 *   An array of all CSS items (files and inline CSS) being
 *   requested on the page.
 * @param \Drupal\Core\Asset\AttachedAssetsInterface $assets
 *   The assets attached to the current response.
 *
 * @see Drupal\Core\Asset\LibraryResolverInterface::getCssAssets()
 */
/* function SUBTHEME_MACHINE_NAME_css_alter(array &$css,
AttachedAssetsInterface $assets) {
} */

/**
 * Implements hook_theme_suggestions_page_alter().
 */
/* function SUBTHEME_MACHINE_NAME_theme_suggestions_page_alter(array &$suggestions,
array $variables) {
} */

/**
 * Implements hook_theme_suggestions_node_alter().
 */
/* function SUBTHEME_MACHINE_NAME_theme_suggestions_node_alter(array &$suggestions,
array $variables) {
} */

/**
 * Implements hook_theme_suggestions_field_alter().
 */
/* function SUBTHEME_MACHINE_NAME_theme_suggestions_field_alter(array &$suggestions,
 * array $variables) {
}*/

/**
 * Implements hook_theme_suggestions_fieldset_alter().
 */
/* function SUBTHEME_MACHINE_NAME_theme_suggestions_fieldset_alter(array &$suggestions,
array $variables) {
} */

/**
 * Implements hook_theme_suggestions_details_alter().
 */
/* function SUBTHEME_MACHINE_NAME_theme_suggestions_details_alter(array &$suggestions,
array $variables) {
} */

/**
 * Implements hook_theme_suggestions_item_list_alter().
 */
/* function SUBTHEME_MACHINE_NAME_theme_suggestions_item_list_alter(array &$suggestions,
array $variables) {
}*/

/**
 * Implements hook_theme_suggestions_form_alter().
 */
/* function SUBTHEME_MACHINE_NAME_theme_suggestions_form_alter(array &$suggestions,
array $variables) {
}*/

/**
 * Implements hook_theme_suggestions_form_element_alter().
 */
/* function SUBTHEME_MACHINE_NAME_theme_suggestions_form_element_alter(
array &$suggestions, array $variables) {
}*/

/**
 * Implements hook_theme_suggestions_label_alter().
 */
/* function SUBTHEME_MACHINE_NAME_theme_suggestions_form_element_label_alter(
 * array &$suggestions, array $variables) {
}*/

/**
 * Implements hook_theme_suggestions_facet_result_item_alter() for facets-result-item.html.twig.
 */
/* function SUBTHEME_MACHINE_NAME_theme_suggestions_facets_result_item_alter(
/* array &$suggestions, array $variables) {
}*/

/**
 * Implements hook_theme_suggestions_views_view_alter().
 */
/* function SUBTHEME_MACHINE_NAME_theme_suggestions_views_view_alter(array &$suggestions,
array $variables) {
}*/

/**
 * Implements hook_theme_suggestions_views_view_list_alter().
 */
/*function SUBTHEME_MACHINE_NAME_theme_suggestions_views_view_list_alter(
/*array &$suggestions, array $variables) {
}*/

/**
 * Implements hook_theme_suggestions_views_view_table_alter().
 */
/*function SUBTHEME_MACHINE_NAME_theme_suggestions_views_view_table_alter(
/*array &$suggestions, array $variables) {
}*/
