public function WebformOptions::hasAlterHooks in Webform 8.5
Same name and namespace in other branches
- 6.x 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\EntityCode
public function hasAlterHooks() {
$hook_name = 'webform_options_' . $this
->id() . '_alter';
$alter_hooks = \Drupal::moduleHandler()
->getImplementations($hook_name);
return count($alter_hooks) ? TRUE : FALSE;
}