You are here

public function CachedEntityCrudOperationsControllerTrait::create in Apigee Edge 8

File

src/Entity/Controller/CachedEntityCrudOperationsControllerTrait.php, line 51

Class

CachedEntityCrudOperationsControllerTrait
Helper trait for those entity controllers that supports all CRUD operations.

Namespace

Drupal\apigee_edge\Entity\Controller

Code

public function create(EntityInterface $entity) : void {
  $this
    ->decorated()
    ->create($entity);
  $this
    ->entityCache()
    ->saveEntities([
    $entity,
  ]);
}