public function SocialMediaItem::isEmpty in Social media share 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/ SocialMediaItem.php, line 127
Class
- SocialMediaItem
- Plugin implementation of the 'social_media' field type.
Namespace
Drupal\social_media\Plugin\Field\FieldTypeCode
public function isEmpty() {
$value = $this
->get('value')
->getValue();
return $value === NULL || $value === '' || $value === '0';
}