function TextWithSummaryItem::isEmpty

Same name in other branches
  1. 9 core/modules/text/src/Plugin/Field/FieldType/TextWithSummaryItem.php \Drupal\text\Plugin\Field\FieldType\TextWithSummaryItem::isEmpty()
  2. 8.9.x core/modules/text/src/Plugin/Field/FieldType/TextWithSummaryItem.php \Drupal\text\Plugin\Field\FieldType\TextWithSummaryItem::isEmpty()
  3. 11.x core/modules/text/src/Plugin/Field/FieldType/TextWithSummaryItem.php \Drupal\text\Plugin\Field\FieldType\TextWithSummaryItem::isEmpty()

Overrides TextItemBase::isEmpty

File

core/modules/text/src/Plugin/Field/FieldType/TextWithSummaryItem.php, line 87

Class

TextWithSummaryItem
Plugin implementation of the 'text_with_summary' field type.

Namespace

Drupal\text\Plugin\Field\FieldType

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.