Implements \Drupal\Core\TypedData\ComplexDataInterface::isEmpty().
Overrides ComplexDataInterface::isEmpty
public function isEmpty() {
foreach ($this->properties as $property) {
$definition = $property
->getDefinition();
if (empty($definition['computed']) && $property
->getValue() !== NULL) {
return FALSE;
}
}
if (isset($this->values)) {
foreach ($this->values as $name => $value) {
if (isset($value) && !isset($this->properties[$name])) {
return FALSE;
}
}
}
return TRUE;
}