interface IncidentInterface in Radioactivity 4.0.x
Same name and namespace in other branches
- 8.3 src/IncidentInterface.php \Drupal\radioactivity\IncidentInterface
Defines the Radioactivity Incident.
Hierarchy
- interface \Drupal\radioactivity\IncidentInterface
Expanded class hierarchy of IncidentInterface
All classes that implement IncidentInterface
4 files declare their use of IncidentInterface
- DefaultIncidentStorageTest.php in tests/
src/ Unit/ DefaultIncidentStorageTest.php - EmitControllerTest.php in tests/
src/ Unit/ EmitControllerTest.php - RadioactivityProcessorTest.php in tests/
src/ Unit/ RadioactivityProcessorTest.php - RestIncidentStorageTest.php in tests/
src/ Unit/ RestIncidentStorageTest.php
File
- src/
IncidentInterface.php, line 8
Namespace
Drupal\radioactivityView source
interface IncidentInterface {
/**
* Test validity of the Incident.
*
* @return bool
* True if the incident is valid. False if not.
*/
public function isValid();
/**
* Convert to JSON format.
*
* @return string
* Json encoded incident data.
*/
public function toJson();
/**
* Returns the incident field name.
*
* @return string
* The incident field name.
*/
public function getFieldName();
/**
* Returns the incident entity type.
*
* @return string
* The incident entity type.
*/
public function getEntityTypeId();
/**
* Returns the incident entity id.
*
* @return string|int
* The incident entity id.
*/
public function getEntityId();
/**
* Returns the id of the referenced radioactivity entity.
*
* @return string|int
* The target id.
*/
public function getTargetId();
/**
* Returns the incident energy.
*
* @return int|float
* The incident energy.
*/
public function getEnergy();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
IncidentInterface:: |
public | function | Returns the incident energy. | 1 |
IncidentInterface:: |
public | function | Returns the incident entity id. | 1 |
IncidentInterface:: |
public | function | Returns the incident entity type. | 1 |
IncidentInterface:: |
public | function | Returns the incident field name. | 1 |
IncidentInterface:: |
public | function | Returns the id of the referenced radioactivity entity. | 1 |
IncidentInterface:: |
public | function | Test validity of the Incident. | 1 |
IncidentInterface:: |
public | function | Convert to JSON format. | 1 |