public function WebformHandlerFormBase::exists in Webform 8.5
Same name and namespace in other branches
- 6.x 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 394
Class
- WebformHandlerFormBase
- Provides a base webform for webform handlers.
Namespace
Drupal\webform\FormCode
public function exists($handler_id) {
$instance_ids = $this->webform
->getHandlers()
->getInstanceIds();
return isset($instance_ids[$handler_id]) ? TRUE : FALSE;
}