You are here

public function EncryptedFieldStorageItem::isEmpty in Field Encryption 3.0.x

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/EncryptedFieldStorageItem.php, line 103

Class

EncryptedFieldStorageItem
Plugin implementation of the 'encrypted_field_storage' field type.

Namespace

Drupal\field_encrypt\Plugin\Field\FieldType

Code

public function isEmpty() {

  // We cannot use the parent implementation as it does not consider the
  // additional 'decrypted_value' property.
  return $this
    ->get('value')
    ->getValue() === NULL && $this
    ->get('decrypted_value') === NULL;
}