WebformProtectedDownloadsStorage.php in Webform Protected Downloads 8
Namespace
Drupal\webform_protected_downloadsFile
src/WebformProtectedDownloadsStorage.phpView source
<?php
namespace Drupal\webform_protected_downloads;
use Drupal\Core\Entity\Sql\SqlContentEntityStorage;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Language\LanguageInterface;
use Drupal\webform\Entity\WebformSubmission;
class WebformProtectedDownloadsStorage extends SqlContentEntityStorage implements WebformProtectedDownloadsStorageInterface {
public function getByHash(string $hash) {
return $this
->loadByProperties([
'hash' => $hash,
]);
}
public function getByWebformSubmission(WebformSubmission $webformSubmission) {
return $this
->loadByProperties([
'webform_submission' => $webformSubmission
->id(),
]);
}
}
Classes
Name | Description |
---|---|
WebformProtectedDownloadsStorage |