function EntityType::setClass

Overrides PluginDefinition::setClass

1 call to EntityType::setClass()
EntityType::set in core/lib/Drupal/Core/Entity/EntityType.php
Sets a value to an arbitrary property.

File

core/lib/Drupal/Core/Entity/EntityType.php, line 475

Class

EntityType
Provides an implementation of an entity type and its metadata.

Namespace

Drupal\Core\Entity

Code

public function setClass($class) {
  if ($this->class) {
    if (!$this->originalClass) {
      // If the original class is currently not set, set it to the current
      // class, assume that is the original class name.
      $this->originalClass = $this->class;
    }
    $this->decoratedClasses[] = $this->class;
  }
  return parent::setClass($class);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.