You are here

public function Element::hasError in Express 8

Indicates whether the element has an error set.

Throws

\BadMethodCallException When the element instance was not constructed with a valid form state object.

File

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

Class

Element
Provides helper methods for Drupal render elements.

Namespace

Drupal\bootstrap\Utility

Code

public function hasError() {
  $error = $this
    ->getError();
  return isset($error);
}