interface EntityUsageTrackInterface in Entity Usage 8
Same name and namespace in other branches
- 8.2 src/EntityUsageTrackInterface.php \Drupal\entity_usage\EntityUsageTrackInterface
- 8.3 src/EntityUsageTrackInterface.php \Drupal\entity_usage\EntityUsageTrackInterface
Defines the interface for entity_usage track methods.
Track plugins use any arbitrary method to link two entities together. Examples include:
- Entities related through an entity_reference field are tracked using the "entity_reference" method.
- Entities embedded into other entities are tracked using the "embed" method.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\entity_usage\EntityUsageTrackInterface
Expanded class hierarchy of EntityUsageTrackInterface
All classes that implement EntityUsageTrackInterface
1 file declares its use of EntityUsageTrackInterface
- EntityReference.php in src/
Plugin/ EntityUsage/ Track/ EntityReference.php
File
- src/
EntityUsageTrackInterface.php, line 18
Namespace
Drupal\entity_usageView source
interface EntityUsageTrackInterface extends PluginInspectionInterface {
/**
* Returns the tracking method unique id.
*
* @return string
* The tracking method id.
*/
public function getId();
/**
* Returns the tracking method label.
*
* @return string
* The tracking method label.
*/
public function getLabel();
/**
* Returns the tracking method description.
*
* @return string
* The tracking method description.
*/
public function getDescription();
/**
* Track usage updates on the creation of entities.
*
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
* The entity we are dealing with.
*/
public function trackOnEntityCreation(ContentEntityInterface $entity);
/**
* Track usage updates on the edition of entities.
*
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
* The entity we are dealing with.
*/
public function trackOnEntityUpdate(ContentEntityInterface $entity);
/**
* Track usage updates on the deletion of entities.
*
* @param \Drupal\Core\Entity\ContentEntityInterface $entity
* The entity we are dealing with.
*/
public function trackOnEntityDeletion(ContentEntityInterface $entity);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityUsageTrackInterface:: |
public | function | Returns the tracking method description. | 1 |
EntityUsageTrackInterface:: |
public | function | Returns the tracking method unique id. | 1 |
EntityUsageTrackInterface:: |
public | function | Returns the tracking method label. | 1 |
EntityUsageTrackInterface:: |
public | function | Track usage updates on the creation of entities. | 1 |
EntityUsageTrackInterface:: |
public | function | Track usage updates on the deletion of entities. | 1 |
EntityUsageTrackInterface:: |
public | function | Track usage updates on the edition of entities. | 1 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |