ContentEntityBase::__isset

public ContentEntityBase::__isset($name)

Implements the magic method for isset().

File

core/lib/Drupal/Core/Entity/ContentEntityBase.php, line 953

Class

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

Namespace

Drupal\Core\Entity

Code

1
2
3
4
5
6
7
8
9
10
public function __isset($name) {
  // "Official" Field API fields are always set.
  if ($this->hasField($name)) {
    return TRUE;
  }
  // For non-field properties, check the internal values.
  else {
    return isset($this->values[$name]);
  }
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.