You are here

public function Element::isButton in Express 8

Indicates whether the element is a button.

Return value

bool TRUE or FALSE.

3 calls to Element::isButton()
Element::colorize in themes/contrib/bootstrap/src/Utility/Element.php
Adds a specific Bootstrap class to color a button based on its text value.
Element::setButtonSize in themes/contrib/bootstrap/src/Utility/Element.php
Adds Bootstrap button size class to the element.
Element::setIcon in themes/contrib/bootstrap/src/Utility/Element.php
Adds an icon to button element based on its text value.

File

themes/contrib/bootstrap/src/Utility/Element.php, line 406
Contains \Drupal\bootstrap\Utility\Element.

Class

Element
Provides helper methods for Drupal render elements.

Namespace

Drupal\bootstrap\Utility

Code

public function isButton() {
  return !empty($this->array['#is_button']) || $this
    ->isType([
    'button',
    'submit',
    'reset',
    'image_button',
  ]) || $this
    ->hasClass('btn');
}