protected function CustomBlock::init

Initialize the object. Invoked upon construction and wake up.

Overrides EntityNG::init

File

drupal/core/modules/block/custom_block/lib/Drupal/custom_block/Plugin/Core/Entity/CustomBlock.php, line 157
Contains \Drupal\custom_block\Plugin\Core\Entity\CustomBlock.

Class

CustomBlock
Defines the custom block entity class.

Namespace

Drupal\custom_block\Plugin\Core\Entity

Code

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

  // We unset all defined properties except theme, so magic getters apply.
  // $this->theme is a special use-case that is only used in the lifecycle of
  // adding a new block using the block library.
  unset($this->id);
  unset($this->info);
  unset($this->revision_id);
  unset($this->log);
  unset($this->uuid);
  unset($this->type);
  unset($this->new);
}