public function Element::isType in Express 8
Checks if the element is a specific type of element.
Parameters
string|array $type: The element type(s) to check.
Return value
bool TRUE if element is or one of $type.
2 calls to Element::isType()
- Element::isButton in themes/
contrib/ bootstrap/ src/ Utility/ Element.php - Indicates whether the element is a button.
- Element::smartDescription in themes/
contrib/ bootstrap/ src/ Utility/ Element.php - Converts an element description into a tooltip based on certain criteria.
File
- themes/
contrib/ bootstrap/ src/ Utility/ Element.php, line 463 - Contains \Drupal\bootstrap\Utility\Element.
Class
- Element
- Provides helper methods for Drupal render elements.
Namespace
Drupal\bootstrap\UtilityCode
public function isType($type) {
$property = $this
->getProperty('type');
return $property && in_array($property, is_array($type) ? $type : [
$type,
]);
}