You are here

public function ContentEntityBase::__isset in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Entity/ContentEntityBase.php \Drupal\Core\Entity\ContentEntityBase::__isset()

Implements the magic method for isset().

File

core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 956
Contains \Drupal\Core\Entity\ContentEntityBase.

Class

ContentEntityBase
Implements Entity Field API specific enhancements to the Entity class.

Namespace

Drupal\Core\Entity

Code

public function __isset($name) {

  // "Official" Field API fields are always set.
  if ($this
    ->hasField($name)) {
    return TRUE;
  }
  else {
    return isset($this->values[$name]);
  }
}