public function TextWithSummaryItem::isEmpty in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/text/src/Plugin/Field/FieldType/TextWithSummaryItem.php \Drupal\text\Plugin\Field\FieldType\TextWithSummaryItem::isEmpty()
Determines whether the data structure is empty.
Return value
bool TRUE if the data structure is empty, FALSE otherwise.
Overrides TextItemBase::isEmpty
File
- core/
modules/ text/ src/ Plugin/ Field/ FieldType/ TextWithSummaryItem.php, line 84 - Contains \Drupal\text\Plugin\Field\FieldType\TextWithSummaryItem.
Class
- TextWithSummaryItem
- Plugin implementation of the 'text_with_summary' field type.
Namespace
Drupal\text\Plugin\Field\FieldTypeCode
public function isEmpty() {
$value = $this
->get('summary')
->getValue();
return parent::isEmpty() && ($value === NULL || $value === '');
}