You are here

public function RgbItem::isEmpty in Examples for Developers 8

Same name and namespace in other branches
  1. 3.x modules/field_example/src/Plugin/Field/FieldType/RgbItem.php \Drupal\field_example\Plugin\Field\FieldType\RgbItem::isEmpty()

Determines whether the data structure is empty.

Return value

bool TRUE if the data structure is empty, FALSE otherwise.

Overrides Map::isEmpty

File

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\FieldType

Code

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