You are here

public function TimeField::isEmpty in Timefield 1.0.x

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/TimeField.php, line 148

Class

TimeField
Plugin implementation of the 'timefield' field type.

Namespace

Drupal\timefield\Plugin\Field\FieldType

Code

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