Same name and namespace in other branches
  1. 3.0.x src/Plugin/Field/FieldType/ColorFieldType.php \Drupal\color_field\Plugin\Field\FieldType\ColorFieldType::isEmpty()

Fichier

src/Plugin/Field/FieldType/ColorFieldType.php, line 134

Classe

ColorFieldType
Plugin implementation of the 'color_type' field type.

Namespace

Drupal\color_field\Plugin\Field\FieldType

Code

public function isEmpty() {
    $value = $this->get('color')
        ->getValue();
    return $value === NULL || $value === '';
}