You are here

public function IpAddressField::isEmpty in IP address fields 2.0.x

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

Class

IpAddressField
Plugin implementation of the 'ipaddress' field type.

Namespace

Drupal\field_ipaddress\Plugin\Field\FieldType

Code

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