class EntityUsageEvent in Entity Usage 8.3
Same name and namespace in other branches
- 8.4 src/Events/EntityUsageEvent.php \Drupal\entity_usage\Events\EntityUsageEvent
- 8 src/Events/EntityUsageEvent.php \Drupal\entity_usage\Events\EntityUsageEvent
- 8.2 src/Events/EntityUsageEvent.php \Drupal\entity_usage\Events\EntityUsageEvent
Implementation of Entity Usage events.
Hierarchy
- class \Drupal\entity_usage\Events\EntityUsageEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of EntityUsageEvent
2 files declare their use of EntityUsageEvent
- EntityUsage.php in src/
EntityUsage.php - EntityUsageTest.php in tests/
src/ Kernel/ EntityUsageTest.php
File
- src/
Events/ EntityUsageEvent.php, line 10
Namespace
Drupal\entity_usage\EventsView source
class EntityUsageEvent extends Event {
/**
* The target entity ID.
*
* @var string
*/
protected $targetEntityId;
/**
* The target entity type.
*
* @var string
*/
protected $targetEntityType;
/**
* The source entity ID.
*
* @var string
*/
protected $sourceEntityId;
/**
* The source entity type.
*
* @var string
*/
protected $sourceEntityType;
/**
* The source entity language code.
*
* @var string
*/
protected $sourceEntityLangcode;
/**
* The source entity revision ID.
*
* @var string
*/
protected $sourceEntityRevisionId;
/**
* EntityUsageEvents constructor.
*
* @param int $target_id
* The target entity ID.
* @param string $target_type
* The target entity type.
* @param int $source_id
* The source entity ID.
* @param string $source_type
* The source entity type.
* @param string $source_langcode
* The source entity language code.
* @param string $source_vid
* The source entity revision ID.
*/
public function __construct($target_id = NULL, $target_type = NULL, $source_id = NULL, $source_type = NULL, $source_langcode = NULL, $source_vid = NULL) {
$this->targetEntityId = $target_id;
$this->targetEntityType = $target_type;
$this->sourceEntityId = $source_id;
$this->sourceEntityType = $source_type;
$this->sourceEntityLangcode = $source_langcode;
$this->sourceEntityRevisionId = $source_vid;
}
/**
* Sets the target entity id.
*
* @param int $id
* The target entity id.
*/
public function setTargetEntityId($id) {
$this->targetEntityId = $id;
}
/**
* Sets the target entity type.
*
* @param string $type
* The target entity type.
*/
public function setTargetEntityType($type) {
$this->targetEntityType = $type;
}
/**
* Sets the source entity id.
*
* @param int $id
* The source entity id.
*/
public function setSourceEntityId($id) {
$this->sourceEntityId = $id;
}
/**
* Sets the source entity type.
*
* @param string $type
* The source entity type.
*/
public function setSourceEntityType($type) {
$this->sourceEntityType = $type;
}
/**
* Sets the source entity language code.
*
* @param string $langcode
* The source entity language code.
*/
public function setSourceEntityLangcode($langcode) {
$this->sourceEntityLangcode = $langcode;
}
/**
* Sets the source entity revision ID.
*
* @param string $vid
* The source entity revision ID.
*/
public function setSourceEntityRevisionId($vid) {
$this->sourceEntityRevisionId = $vid;
}
/**
* Gets the target entity id.
*
* @return null|string
* The target entity id or NULL.
*/
public function getTargetEntityId() {
return $this->targetEntityId;
}
/**
* Gets the target entity type.
*
* @return null|string
* The target entity type or NULL.
*/
public function getTargetEntityType() {
return $this->targetEntityType;
}
/**
* Gets the source entity id.
*
* @return null|int
* The source entity id or NULL.
*/
public function getSourceEntityId() {
return $this->sourceEntityId;
}
/**
* Gets the source entity type.
*
* @return null|string
* The source entity type or NULL.
*/
public function getSourceEntityType() {
return $this->sourceEntityType;
}
/**
* Gets the source entity language code.
*
* @return null|string
* The source entity language code or NULL.
*/
public function getSourceEntityLangcode() {
return $this->sourceEntityLangcode;
}
/**
* Gets the source entity revision ID.
*
* @return null|string
* The source entity revision ID or NULL.
*/
public function getSourceEntityRevisionId() {
return $this->sourceEntityRevisionId;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityUsageEvent:: |
protected | property | The source entity ID. | |
EntityUsageEvent:: |
protected | property | The source entity language code. | |
EntityUsageEvent:: |
protected | property | The source entity revision ID. | |
EntityUsageEvent:: |
protected | property | The source entity type. | |
EntityUsageEvent:: |
protected | property | The target entity ID. | |
EntityUsageEvent:: |
protected | property | The target entity type. | |
EntityUsageEvent:: |
public | function | Gets the source entity id. | |
EntityUsageEvent:: |
public | function | Gets the source entity language code. | |
EntityUsageEvent:: |
public | function | Gets the source entity revision ID. | |
EntityUsageEvent:: |
public | function | Gets the source entity type. | |
EntityUsageEvent:: |
public | function | Gets the target entity id. | |
EntityUsageEvent:: |
public | function | Gets the target entity type. | |
EntityUsageEvent:: |
public | function | Sets the source entity id. | |
EntityUsageEvent:: |
public | function | Sets the source entity language code. | |
EntityUsageEvent:: |
public | function | Sets the source entity revision ID. | |
EntityUsageEvent:: |
public | function | Sets the source entity type. | |
EntityUsageEvent:: |
public | function | Sets the target entity id. | |
EntityUsageEvent:: |
public | function | Sets the target entity type. | |
EntityUsageEvent:: |
public | function | EntityUsageEvents constructor. |