You are here

public function CachedAttributesAwareEntityControllerTrait::deleteAttribute in Apigee Edge 8

File

src/Entity/Controller/CachedAttributesAwareEntityControllerTrait.php, line 99

Class

CachedAttributesAwareEntityControllerTrait
Helper trait for those entity controllers that supports attribute CRUDL.

Namespace

Drupal\apigee_edge\Entity\Controller

Code

public function deleteAttribute(string $entity_id, string $name) : void {
  $this
    ->decorated()
    ->deleteAttribute($entity_id, $name);

  // Enforce reload of entity from Apigee Edge.
  $this
    ->entityCache()
    ->removeEntities([
    $entity_id,
  ]);
  $this
    ->entityCache()
    ->allEntitiesInCache(FALSE);
}