protected function Comment::init

Same name in this branch

Initialize the object. Invoked upon construction and wake up.

Overrides EntityNG::init

File

drupal/core/modules/comment/lib/Drupal/comment/Plugin/Core/Entity/Comment.php, line 199
Definition of Drupal\comment\Plugin\Core\Entity\Comment.

Class

Comment
Defines the comment entity class.

Namespace

Drupal\comment\Plugin\Core\Entity

Code

protected function init() {
  parent::init();

  // We unset all defined properties, so magic getters apply.
  unset($this->cid);
  unset($this->uuid);
  unset($this->pid);
  unset($this->nid);
  unset($this->subject);
  unset($this->uid);
  unset($this->name);
  unset($this->mail);
  unset($this->homepage);
  unset($this->hostname);
  unset($this->created);
  unset($this->changed);
  unset($this->status);
  unset($this->thread);
  unset($this->node_type);
  unset($this->new);
}