public function TextItemBase::isEmpty in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/text/src/Plugin/Field/FieldType/TextItemBase.php \Drupal\text\Plugin\Field\FieldType\TextItemBase::isEmpty()
Determines whether the data structure is empty.
Return value
bool TRUE if the data structure is empty, FALSE otherwise.
Overrides Map::isEmpty
1 call to TextItemBase::isEmpty()
- TextWithSummaryItem::isEmpty in core/
modules/ text/ src/ Plugin/ Field/ FieldType/ TextWithSummaryItem.php - Determines whether the data structure is empty.
1 method overrides TextItemBase::isEmpty()
- TextWithSummaryItem::isEmpty in core/
modules/ text/ src/ Plugin/ Field/ FieldType/ TextWithSummaryItem.php - Determines whether the data structure is empty.
File
- core/
modules/ text/ src/ Plugin/ Field/ FieldType/ TextItemBase.php, line 54 - Contains \Drupal\text\Plugin\Field\FieldType\TextItemBase.
Class
- TextItemBase
- Base class for 'text' configurable field types.
Namespace
Drupal\text\Plugin\Field\FieldTypeCode
public function isEmpty() {
$value = $this
->get('value')
->getValue();
return $value === NULL || $value === '';
}