You are here

public function TimeType::isEmpty in Time Field For Drupal 8.x / 9.x 8

Same name and namespace in other branches
  1. 2.x src/Plugin/Field/FieldType/TimeType.php \Drupal\time_field\Plugin\Field\FieldType\TimeType::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/TimeType.php, line 85

Class

TimeType
Plugin implementation of the 'time' field type.

Namespace

Drupal\time_field\Plugin\Field\FieldType

Code

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