public function LanguageItem::isEmpty in Custom Language 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/ LanguageItem.php, line 241
Class
- LanguageItem
- Plugin implementation of the 'language' field type.
Namespace
Drupal\languagefield\Plugin\Field\FieldTypeCode
public function isEmpty() {
$value = $this
->get('value')
->getValue();
return $value === NULL || $value === '';
}