public function ColorItem::isEmpty in Color API 8
Determines whether the data structure is empty.
Return value
bool TRUE if the data structure is empty, FALSE otherwise.
Overrides Map::isEmpty
File
- src/
Plugin/ Field/ FieldType/ ColorItem.php, line 43
Class
- ColorItem
- Provides the Color field.
Namespace
Drupal\colorapi\Plugin\Field\FieldTypeCode
public function isEmpty() {
$hex_value = $this
->getHexadecimal();
return $hex_value === NULL || $hex_value === '' || $hex_value === FALSE;
}