You are here

protected function ThemeSuggestions::alterInput in Express 8

Dynamic alter method for "input".

File

themes/contrib/bootstrap/src/Plugin/Alter/ThemeSuggestions.php, line 107
Contains \Drupal\bootstrap\Plugin\Alter\ThemeSuggestions.

Class

ThemeSuggestions
Implements hook_theme_suggestions_alter().

Namespace

Drupal\bootstrap\Plugin\Alter

Code

protected function alterInput() {
  if ($this->element && $this->element
    ->isButton()) {
    $hook = 'input__button';
    if ($this->element
      ->getProperty('split')) {
      $hook .= '__split';
    }
    $this
      ->addSuggestion($hook);
  }
  elseif ($this->element && !$this->element
    ->isType($this->ignoreFormControlTypes)) {
    $this
      ->addSuggestion('input__form_control');
  }
}