public function CountryStateCityType::isEmpty in Country, State and City Fields 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/ CountryStateCityType.php, line 141
Class
- CountryStateCityType
- Plugin implementation of the 'country_state_city_type' field type.
Namespace
Drupal\country_state_city\Plugin\Field\FieldTypeCode
public function isEmpty() {
$country = empty($this
->get('country')
->getValue());
$state = empty($this
->get('state')
->getValue());
$city = empty($this
->get('city')
->getValue());
return $country || $state || $city;
}