You are here

protected static function ScssNumber::isRequired in SCSS Compiler 1.0.x

Check if the element requires a value (either with or without a unit).

Parameters

array $element: The element for which to check for a requirement preference.

Return value

bool TRUE if the element requires a value, FALSE otherwise.

1 call to ScssNumber::isRequired()
ScssNumber::validateNumber in src/Element/ScssNumber.php
Validate a number element's value on form submission.

File

src/Element/ScssNumber.php, line 348

Class

ScssNumber
A form element to represent Sass numbers with a unit.

Namespace

Drupal\compiler_scss\Element

Code

protected static function isRequired(array $element) {
  return boolval($element['#required']);
}