You are here

public function AppByOwnerController::setStatus in Apigee Edge 8

File

src/Entity/Controller/AppByOwnerController.php, line 167

Class

AppByOwnerController
Base class for developer- and company app controller services in Drupal.

Namespace

Drupal\apigee_edge\Entity\Controller

Code

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

  // The status of the app has changed so we have to remove it from the
  // cache and enforce its reload from Apigee Edge.
  // Here entity id can be only the name of the app and not its UUID.
  // @see https://apidocs.apigee.com/management/apis/post/organizations/%7Borg_name%7D/developers/%7Bdeveloper_email_or_id%7D/apps/%7Bapp_name%7D
  $this->appCacheByOwner
    ->removeEntities([
    $entity_id,
  ]);
}