You are here

public function MobileNumberItem::isEmpty in Mobile Number 2.0.x

Same name and namespace in other branches
  1. 8 src/Plugin/Field/FieldType/MobileNumberItem.php \Drupal\mobile_number\Plugin\Field\FieldType\MobileNumberItem::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/MobileNumberItem.php, line 96

Class

MobileNumberItem
Plugin implementation of the 'mobile_number' field type.

Namespace

Drupal\mobile_number\Plugin\Field\FieldType

Code

public function isEmpty() {
  $value = $this
    ->getValue();
  return empty($value['value']) && empty($value['local_number']);
}