Commit ca7950c5 authored by Ivan Doroshenko's avatar Ivan Doroshenko Committed by Liam Morland
Browse files

ISTWCMS-4881: Use WebformInterface in uw_sites_all_webform_presave()

This function will only be called with this entity type anyway and it
means we can use methods that are specific to WebformInterface.
parent cd1b38e5
......@@ -5,9 +5,9 @@
* Workbench module file.
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\menu_link_content\Entity\MenuLinkContent;
use Drupal\webform\WebformInterface;
* Implements hook_form_BASE_FORM_ID_alter().
......@@ -131,7 +131,7 @@ function uw_sites_all_update_projects_alter(&$projects) {
* Implements hook_ENTITY_TYPE_presave().
function uw_sites_all_webform_presave(EntityInterface $webform): void {
function uw_sites_all_webform_presave(WebformInterface $webform): void {
// Add a Webform CAPTCHA component to each newly-created Webform.
if ($webform->isNew()) {
$elements = [
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment