<?php

use Drupal\views\ViewExecutable;

function dc_core_page_attachments(array &$attachments) {
  if (\Drupal::service('router.admin_context')->isAdminRoute()) {
    $attachments['#attached']['library'][] = 'dc_core/admin_overrides';
  }
  if (\Drupal::routeMatch()->getRouteObject()->getOption('_layout_builder')) {
   $attachments['#attached']['library'][] = 'dc_core/admin_overrides';
  }
}

function dc_core_form_taxonomy_term_ufc_events_form_alter(&$form, &$form_state, $form_id) {
  $form['actions']['refresh'] = array(
    '#type' => 'submit',
    '#value' => t('Refresh Property'),
    '#access' => TRUE,
    '#submit' => ['dc_core_taxo_form_submit'],
    '#weight' => -30,
  );
}

function dc_core_taxo_form_submit($form, &$form_state) {

}

function dc_core_theme() {
  return [
    'lotr_characters' => [
      'variables' => [
        'characters' => [],
      ],
    ],
  ];
}
