PathDeleteEvent.php in Hook Event Dispatcher 8
File
src/Event/Path/PathDeleteEvent.php
View source
<?php
namespace Drupal\hook_event_dispatcher\Event\Path;
use Drupal\hook_event_dispatcher\HookEventDispatcherInterface;
final class PathDeleteEvent extends BasePathEvent {
private $redirect;
public function __construct(array $fields) {
parent::__construct($fields);
$this->redirect = isset($fields['redirect']) ? $fields['redirect'] : NULL;
}
public function isRedirect() {
return $this->redirect === TRUE;
}
public function getDispatcherType() {
return HookEventDispatcherInterface::PATH_DELETE;
}
}