function TelephoneItem::isEmpty

Same name in other branches
  1. 9 core/modules/telephone/src/Plugin/Field/FieldType/TelephoneItem.php \Drupal\telephone\Plugin\Field\FieldType\TelephoneItem::isEmpty()
  2. 8.9.x core/modules/telephone/src/Plugin/Field/FieldType/TelephoneItem.php \Drupal\telephone\Plugin\Field\FieldType\TelephoneItem::isEmpty()
  3. 11.x core/modules/telephone/src/Plugin/Field/FieldType/TelephoneItem.php \Drupal\telephone\Plugin\Field\FieldType\TelephoneItem::isEmpty()

Overrides Map::isEmpty

File

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

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 === '';
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.