public function EntityTranslation::isEmpty

Implements \Drupal\Core\TypedData\ComplexDataInterface::isEmpty().

Overrides ComplexDataInterface::isEmpty

File

drupal/core/lib/Drupal/Core/Entity/Field/Type/EntityTranslation.php, line 192
Contains \Drupal\Core\Entity\Type\EntityTranslation.

Class

EntityTranslation
Allows accessing and updating translated entity fields.

Namespace

Drupal\Core\Entity\Field\Type

Code

public function isEmpty() {
  foreach ($this
    ->getProperties() as $property) {
    if ($property
      ->getValue() !== NULL) {
      return FALSE;
    }
  }
  return TRUE;
}