abstract class BasePathEvent in Hook Event Dispatcher 8
Class BasePathEvent.
Hierarchy
- class \Drupal\hook_event_dispatcher\Event\Path\BasePathEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of BasePathEvent
File
- src/
Event/ Path/ BasePathEvent.php, line 11
Namespace
Drupal\hook_event_dispatcher\Event\PathView source
abstract class BasePathEvent extends Event implements EventInterface {
/**
* The source like '/node/1'.
*
* @var string
*/
protected $source;
/**
* The alias for the source.
*
* @var string
*/
protected $alias;
/**
* Lang code.
*
* @var string
*/
protected $langcode;
/**
* The path id.
*
* @var int
*/
protected $pid;
/**
* BaseEntityEvent constructor.
*
* @param array $fields
* The Entity.
*/
public function __construct(array $fields) {
$this->source = $fields['source'];
$this->alias = $fields['alias'];
$this->langcode = $fields['langcode'];
$this->pid = (int) $fields['pid'];
}
/**
* Getter.
*
* @return int
* The path id.
*/
public function getPid() {
return $this->pid;
}
/**
* Getter.
*
* @return string
* The source like '/node/1'.
*/
public function getSource() {
return $this->source;
}
/**
* Getter.
*
* @return string
* The alias.
*/
public function getAlias() {
return $this->alias;
}
/**
* Getter.
*
* @return string
* The langcode like 'nl'.
*/
public function getLangcode() {
return $this->langcode;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BasePathEvent:: |
protected | property | The alias for the source. | |
BasePathEvent:: |
protected | property | Lang code. | |
BasePathEvent:: |
protected | property | The path id. | |
BasePathEvent:: |
protected | property | The source like '/node/1'. | |
BasePathEvent:: |
public | function | Getter. | |
BasePathEvent:: |
public | function | Getter. | |
BasePathEvent:: |
public | function | Getter. | |
BasePathEvent:: |
public | function | Getter. | |
BasePathEvent:: |
public | function | BaseEntityEvent constructor. | 1 |
EventInterface:: |
public | function | Get the dispatcher type. | 66 |