You are here

public function PhoneInternational::isEmpty in International Phone 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldType/PhoneInternational.php \Drupal\phone_international\Plugin\Field\FieldType\PhoneInternational::isEmpty()
  2. 3.x src/Plugin/Field/FieldType/PhoneInternational.php \Drupal\phone_international\Plugin\Field\FieldType\PhoneInternational::isEmpty()

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/PhoneInternational.php, line 62

Class

PhoneInternational
Plugin implementation of the 'phone_international' field type.

Namespace

Drupal\phone_international\Plugin\Field\FieldType

Code

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