You are here

public function NativeJSONItem::isEmpty in JSON Field 8

Determines whether the data structure is empty.

Return value

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

Overrides Map::isEmpty

File

src/Plugin/Field/FieldType/NativeJSONItem.php, line 43

Class

NativeJSONItem
Plugin implementation of the 'json' field type.

Namespace

Drupal\json_field\Plugin\Field\FieldType

Code

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