function RgbItem::isEmpty
Same name in other branches
- 3.x modules/field_example/src/Plugin/Field/FieldType/RgbItem.php \Drupal\field_example\Plugin\Field\FieldType\RgbItem::isEmpty()
- 8.x-1.x field_example/src/Plugin/Field/FieldType/RgbItem.php \Drupal\field_example\Plugin\Field\FieldType\RgbItem::isEmpty()
Overrides Map::isEmpty
File
-
modules/
field_example/ src/ Plugin/ Field/ FieldType/ RgbItem.php, line 41
Class
- RgbItem
- Plugin implementation of the 'field_example_rgb' field type.
Namespace
Drupal\field_example\Plugin\Field\FieldTypeCode
public function isEmpty() {
$value = $this->get('value')
->getValue();
return $value === NULL || $value === '';
}