<?php

/**
 * Implements hook__preprocess_input__submit().
 */
function toc_emr_preprocess_input__submit(&$vars) {
  $element = $vars['element'];
  // Extra input preprocess functions for views filters.
  // @todo - move to name suggestions if possible.
  if (!empty($element['#view']) && !empty($element['#display'])) {
    $view = $element['#view'];
    $display = $element['#display'];
    $callback = '_toc_emr_preprocess_input__submit__' . $view . '__' . $display;
    $args = [$vars];
    if (function_exists($callback) && is_callable($callback)) {
      $vars = call_user_func_array($callback, $args);
    }
  }
}