You are here

public function WebformHandlerFormBase::exists in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Form/WebformHandlerFormBase.php \Drupal\webform\Form\WebformHandlerFormBase::exists()

Determines if the webform handler ID already exists.

Parameters

string $handler_id: The webform handler ID.

Return value

bool TRUE if the webform handler ID exists, FALSE otherwise.

File

src/Form/WebformHandlerFormBase.php, line 370

Class

WebformHandlerFormBase
Provides a base webform for webform handlers.

Namespace

Drupal\webform\Form

Code

public function exists($handler_id) {
  $instance_ids = $this->webform
    ->getHandlers()
    ->getInstanceIds();
  return isset($instance_ids[$handler_id]) ? TRUE : FALSE;
}