class EntityEvent in Feeds 8.3
Fired at various phases during the process stage.
Hierarchy
- class \Drupal\feeds\Event\EventBase extends \Symfony\Component\EventDispatcher\Event
- class \Drupal\feeds\Event\EntityEvent
Expanded class hierarchy of EntityEvent
2 files declare their use of EntityEvent
- Feed.php in src/
Entity/ Feed.php - FeedsSubscriber.php in tests/
modules/ feeds_test_events/ src/ EventSubscriber/ FeedsSubscriber.php
File
- src/
Event/ EntityEvent.php, line 12
Namespace
Drupal\feeds\EventView source
class EntityEvent extends EventBase {
/**
* The entity being inserted or updated.
*
* @var \Drupal\Core\Entity\EntityInterface
*/
protected $entity;
/**
* The item that is being processed.
*
* @var \Drupal\feeds\Feeds\Item\ItemInterface
*/
protected $item;
/**
* Constructs an EntityEvent object.
*
* @param \Drupal\feeds\FeedInterface $feed
* The feed.
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity being inserted or updated.
* @param \Drupal\feeds\Feeds\Item\ItemInterface $item
* The item that is being processed.
*/
public function __construct(FeedInterface $feed, EntityInterface $entity, ItemInterface $item) {
parent::__construct($feed);
$this->entity = $entity;
$this->item = $item;
}
/**
* Returns the entity.
*
* @return \Drupal\Core\Entity\EntityInterface
* The entity being inserted or updated.
*/
public function getEntity() {
return $this->entity;
}
/**
* Returns the item.
*
* @return \Drupal\feeds\Feeds\Item\ItemInterface
* The item that is being processed.
*/
public function getItem() {
return $this->item;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityEvent:: |
protected | property | The entity being inserted or updated. | |
EntityEvent:: |
protected | property | The item that is being processed. | |
EntityEvent:: |
public | function | Returns the entity. | |
EntityEvent:: |
public | function | Returns the item. | |
EntityEvent:: |
public | function |
Constructs an EntityEvent object. Overrides EventBase:: |
|
EventBase:: |
protected | property | The feed being imported. | |
EventBase:: |
public | function | Returns the feed. |