private function Incident::calculateHash in Radioactivity 8.2
Same name and namespace in other branches
- 8.3 src/Incident.php \Drupal\radioactivity\Incident::calculateHash()
- 4.0.x src/Incident.php \Drupal\radioactivity\Incident::calculateHash()
Calculate hash for this incident
Return value
string
2 calls to Incident::calculateHash()
- Incident::isValid in src/
Incident.php - Test validity of the Incident
- Incident::toJson in src/
Incident.php - Convert to JSON format
File
- src/
Incident.php, line 49
Class
- Incident
- Incident class
Namespace
Drupal\radioactivityCode
private function calculateHash() {
return sha1(implode('##', [
$this->field_name,
$this->entity_type,
$this->entity_id,
$this->energy,
Settings::getHashSalt(),
]));
}