abstract class AbstractPathEvent in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 modules/path_event_dispatcher/src/Event/Path/AbstractPathEvent.php \Drupal\path_event_dispatcher\Event\Path\AbstractPathEvent
Class AbstractPathEvent.
Hierarchy
- class \Drupal\path_event_dispatcher\Event\Path\AbstractPathEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of AbstractPathEvent
File
- modules/
path_event_dispatcher/ src/ Event/ Path/ AbstractPathEvent.php, line 11
Namespace
Drupal\path_event_dispatcher\Event\PathView source
abstract class AbstractPathEvent extends Event implements EventInterface {
/**
* The source like '/node/1'.
*
* @var string
*/
private $source;
/**
* The alias for the source.
*
* @var string
*/
private $alias;
/**
* Lang code.
*
* @var string
*/
private $langcode;
/**
* The path id.
*
* @var int
*/
private $pid;
/**
* AbstractPathEvent constructor.
*
* @param array $path
* The array structure is identical to that of the return value of
* \Drupal\Core\Path\AliasStorageInterface::save().
*/
public function __construct(array $path) {
$this->source = $path['source'];
$this->alias = $path['alias'];
$this->langcode = $path['langcode'];
$this->pid = (int) $path['pid'];
}
/**
* Getter.
*
* @return int
* The path id.
*/
public function getPid() : int {
return $this->pid;
}
/**
* Getter.
*
* @return string
* The source like '/node/1'.
*/
public function getSource() : string {
return $this->source;
}
/**
* Getter.
*
* @return string
* The alias.
*/
public function getAlias() : string {
return $this->alias;
}
/**
* Getter.
*
* @return string
* The langcode like 'nl'.
*/
public function getLangcode() : string {
return $this->langcode;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AbstractPathEvent:: |
private | property | The alias for the source. | |
AbstractPathEvent:: |
private | property | Lang code. | |
AbstractPathEvent:: |
private | property | The path id. | |
AbstractPathEvent:: |
private | property | The source like '/node/1'. | |
AbstractPathEvent:: |
public | function | Getter. | |
AbstractPathEvent:: |
public | function | Getter. | |
AbstractPathEvent:: |
public | function | Getter. | |
AbstractPathEvent:: |
public | function | Getter. | |
AbstractPathEvent:: |
public | function | AbstractPathEvent constructor. | 1 |
EventInterface:: |
public | function | Get the dispatcher type. | 75 |