You are here

public function AppStorage::loadUnchangedByUuid in Apigee Edge 8

Load app by UUID.

This function is more efficient than loadUnchanged(), because it does not need to cover the case when loading is done by App name.

@TODO: this method should be also available in the AppStorageInterface, but that would be a breaking change, so we can only add that in the next major version of the module.

Parameters

string $uuid: App UUID.

Return value

\Drupal\apigee_edge\Entity\AppInterface|null The unchanged entity, or NULL if the entity cannot be loaded.

File

src/Entity/Storage/AppStorage.php, line 113

Class

AppStorage
Base entity storage class for developer and team (company) app entities.

Namespace

Drupal\apigee_edge\Entity\Storage

Code

public function loadUnchangedByUuid(string $uuid) : ?AppInterface {

  // Clear the app controller's cache if it has one.
  if ($this->appController instanceof EntityCacheAwareControllerInterface) {
    $this->appController
      ->entityCache()
      ->removeEntities([
      $uuid,
    ]);
  }
  return parent::loadUnchanged($uuid);
}