You are here

public function Webform::hasAnonymousSubmissionTrackingHandler in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Entity/Webform.php \Drupal\webform\Entity\Webform::hasAnonymousSubmissionTrackingHandler()

Determine if a webform handler requires anonymous submission tracking.

Return value

bool TRUE if a webform handler requires anonymous submission tracking.

Overrides WebformInterface::hasAnonymousSubmissionTrackingHandler

See also

\Drupal\webform_options_limit\Plugin\WebformHandler\OptionsLimitWebformHandler

File

src/Entity/Webform.php, line 2549

Class

Webform
Defines the webform entity.

Namespace

Drupal\webform\Entity

Code

public function hasAnonymousSubmissionTrackingHandler() {
  if (isset($this->hasAnonymousSubmissionTrackingHandler)) {
    $this->hasAnonymousSubmissionTrackingHandler;
  }
  $this->hasAnonymousSubmissionTrackingHandler = FALSE;
  $handlers = $this
    ->getHandlers();
  foreach ($handlers as $handler) {
    if ($handler
      ->hasAnonymousSubmissionTracking()) {
      $this->hasAnonymousSubmissionTrackingHandler = TRUE;
      break;
    }
  }
  return $this->hasAnonymousSubmissionTrackingHandler;
}