Skip to content
Snippets Groups Projects

ISTWCMS-5544 Refactor add a warning message when deleting content

@@ -6,6 +6,7 @@ use Drupal\Core\Session\AccountProxyInterface;
use Drupal\core_event_dispatcher\Event\Form\FormAlterEvent;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\core_event_dispatcher\FormHookEvents;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
@@ -32,6 +33,16 @@ class UwDeleteFormEventSubscriber implements EventSubscriberInterface {
$this->currentUser = $currentUser;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
// Instantiates this form class.
return new static(
$container->get('current_user'),
);
}
/**
* {@inheritdoc}
*/
Loading