public function TextItem::isEmpty

Implements \Drupal\Core\TypedData\ComplexDataInterface::isEmpty().

Overrides Map::isEmpty

1 call to TextItem::isEmpty()
TextSummaryItem::isEmpty in drupal/core/modules/text/lib/Drupal/text/Type/TextSummaryItem.php
Overrides \Drupal\text\Type\TextItem::isEmpty().
1 method overrides TextItem::isEmpty()
TextSummaryItem::isEmpty in drupal/core/modules/text/lib/Drupal/text/Type/TextSummaryItem.php
Overrides \Drupal\text\Type\TextItem::isEmpty().

File

drupal/core/modules/text/lib/Drupal/text/Type/TextItem.php, line 57
Definition of Drupal\text\Type\TextItem.

Class

TextItem
Defines the 'text_field' and 'text_long_field' entity field items.

Namespace

Drupal\text\Type

Code

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