You are here

final class PathDeleteEvent in Hook Event Dispatcher 8

Class PathDeleteEvent.

Hierarchy

Expanded class hierarchy of PathDeleteEvent

1 file declares its use of PathDeleteEvent
hook_event_dispatcher.module in ./hook_event_dispatcher.module
Hook event dispatcher module.

File

src/Event/Path/PathDeleteEvent.php, line 10

Namespace

Drupal\hook_event_dispatcher\Event\Path
View source
final class PathDeleteEvent extends BasePathEvent {

  /**
   * The redirect.
   *
   * @var bool
   */
  private $redirect;

  /**
   * Constructor.
   *
   * @param array $fields
   *   The raw database path fields.
   */
  public function __construct(array $fields) {
    parent::__construct($fields);
    $this->redirect = isset($fields['redirect']) ? $fields['redirect'] : NULL;
  }

  /**
   * Getter.
   *
   * @return bool
   *   If it's a redirect.
   */
  public function isRedirect() {
    return $this->redirect === TRUE;
  }

  /**
   * Get the dispatcher type.
   *
   * @return string
   *   The dispatcher type.
   */
  public function getDispatcherType() {
    return HookEventDispatcherInterface::PATH_DELETE;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BasePathEvent::$alias protected property The alias for the source.
BasePathEvent::$langcode protected property Lang code.
BasePathEvent::$pid protected property The path id.
BasePathEvent::$source protected property The source like '/node/1'.
BasePathEvent::getAlias public function Getter.
BasePathEvent::getLangcode public function Getter.
BasePathEvent::getPid public function Getter.
BasePathEvent::getSource public function Getter.
PathDeleteEvent::$redirect private property The redirect.
PathDeleteEvent::getDispatcherType public function Get the dispatcher type. Overrides EventInterface::getDispatcherType
PathDeleteEvent::isRedirect public function Getter.
PathDeleteEvent::__construct public function Constructor. Overrides BasePathEvent::__construct