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(); } } }