You are here

public function ComputedFieldItemTrait::isEmpty in Computed Field 3.x

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldType/ComputedFieldItemTrait.php \Drupal\computed_field\Plugin\Field\FieldType\ComputedFieldItemTrait::isEmpty()

File

src/Plugin/Field/FieldType/ComputedFieldItemTrait.php, line 21

Class

ComputedFieldItemTrait
Common methods for Computed Field FieldType plugins.

Namespace

Drupal\computed_field\Plugin\Field\FieldType

Code

public function isEmpty() {
  $value = $this
    ->getRawResult();
  if ($value === NULL || $value === '') {
    return TRUE;
  }
  return FALSE;
}