function public function Element::isButton
8.x-3.x Element.php | public Element::isButton() |
Indicates whether the element is a button.
Return value
bool TRUE or FALSE.
Class
- Element
- Provides helper methods for Drupal render elements.
Namespace
Drupal\bootstrap\UtilitySource src/Utility/Element.php (line 436)
public function isButton() {
$button_types = ['button', 'submit', 'reset', 'image_button'];
return !empty($this->array['#is_button']) || $this->isType($button_types) || $this->hasClass('btn');
}