You are here

public function TelephoneItem::isEmpty in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/telephone/src/Plugin/Field/FieldType/TelephoneItem.php \Drupal\telephone\Plugin\Field\FieldType\TelephoneItem::isEmpty()

Determines whether the data structure is empty.

Return value

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

Overrides Map::isEmpty

File

core/modules/telephone/src/Plugin/Field/FieldType/TelephoneItem.php, line 52

Class

TelephoneItem
Plugin implementation of the 'telephone' field type.

Namespace

Drupal\telephone\Plugin\Field\FieldType

Code

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