You are here

public function FieldNote::isEmpty in Examples for Developers 3.x

Same name and namespace in other branches
  1. 8 field_permission_example/src/Plugin/Field/FieldType/FieldNote.php \Drupal\field_permission_example\Plugin\Field\FieldType\FieldNote::isEmpty()

Determines whether the data structure is empty.

Return value

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

Overrides Map::isEmpty

File

modules/field_permission_example/src/Plugin/Field/FieldType/FieldNote.php, line 41

Class

FieldNote
Plugin implementation of the 'field_permission_example' field type.

Namespace

Drupal\field_permission_example\Plugin\Field\FieldType

Code

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