public function HeadingItem::isEmpty in Heading field 8
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/ HeadingItem.php, line 71
Class
- HeadingItem
- Provides a field type "heading" containing a heading type and text.
Namespace
Drupal\heading\Plugin\Field\FieldTypeCode
public function isEmpty() {
$size = $this
->get('size')
->getValue();
$text = $this
->get('text')
->getValue();
return empty($size) && empty($text);
}