8.3.x EntityType.php public EntityType::setStorageClass($class)
8.0.x EntityType.php public EntityType::setStorageClass($class)
8.1.x EntityType.php public EntityType::setStorageClass($class)
8.2.x EntityType.php public EntityType::setStorageClass($class)
8.4.x EntityType.php public EntityType::setStorageClass($class)

Sets the storage class.

Parameters

string $class: The class for this entity type's storage.

Return value

$this

Overrides EntityTypeInterface::setStorageClass

File

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

Class

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

Namespace

Drupal\Core\Entity

Code

public function setStorageClass($class) {
  $this->checkStorageClass($class);
  $this->handlers['storage'] = $class;
  return $this;
}