You are here

public function WebformOptions::hasAlterHooks in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Entity/WebformOptions.php \Drupal\webform\Entity\WebformOptions::hasAlterHooks()

Determine if the webform options has alter hooks.

Return value

bool TRUE if the webform options has alter hooks.

Overrides WebformOptionsInterface::hasAlterHooks

File

src/Entity/WebformOptions.php, line 162

Class

WebformOptions
Defines the webform options entity.

Namespace

Drupal\webform\Entity

Code

public function hasAlterHooks() {
  $hook_name = 'webform_options_' . $this
    ->id() . '_alter';
  $alter_hooks = \Drupal::moduleHandler()
    ->getImplementations($hook_name);
  return count($alter_hooks) ? TRUE : FALSE;
}