Esempio n. 1
0
 public static function getDocumentTypeName($documentType)
 {
     $storageId = self::getStorageIdByType($documentType);
     if ($storageId) {
         $storage = Storage::getById($storageId);
         return '[' . $storage->getSiteId() . '] ' . $storage->getName();
     }
     return $documentType;
 }
Esempio n. 2
0
 /**
  * @param $id
  * @return Disk\Storage
  * @throws RestException
  */
 private function getStorageById($id)
 {
     $storage = Disk\Storage::getById($id);
     if (!$storage) {
         throw new RestException("Could not find entity with id '{$id}'.", RestException::ERROR_NOT_FOUND);
     }
     return $storage;
 }