Update Composer, update everything

This commit is contained in:
Oliver Davies 2018-11-23 12:29:20 +00:00
parent ea3e94409f
commit dda5c284b6
19527 changed files with 1135420 additions and 351004 deletions

View file

@ -0,0 +1,48 @@
<?php
namespace Drupal\webform\Access;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Session\AccountInterface;
use Drupal\webform\WebformSubmissionInterface;
/**
* Defines the custom access control handler for the webform submission entities.
*/
class WebformSubmissionAccess {
/**
* Check whether a webform submissions' webform has wizard pages.
*
* @param \Drupal\webform\WebformSubmissionInterface $webform_submission
* A webform submission.
*
* @return \Drupal\Core\Access\AccessResultInterface
* The access result.
*/
public static function checkWizardPagesAccess(WebformSubmissionInterface $webform_submission) {
$condition = $webform_submission->getWebform()->hasWizardPages();
return AccessResult::allowedIf($condition);
}
/**
* Check that webform submission has (email) messages and the user can update any webform submission.
*
* @param \Drupal\webform\WebformSubmissionInterface $webform_submission
* A webform submission.
* @param \Drupal\Core\Session\AccountInterface $account
* Run access checks for this account.
*
* @return \Drupal\Core\Access\AccessResultInterface
* The access result.
*/
public static function checkResendAccess(WebformSubmissionInterface $webform_submission, AccountInterface $account) {
if ($webform_submission->getWebform()->hasMessageHandler()) {
return AccessResult::allowed();
}
else {
return AccessResult::forbidden();
}
}
}