IncidentStorageInterface.php in Radioactivity 8.3
Same filename and directory in other branches
Namespace
Drupal\radioactivityFile
src/IncidentStorageInterface.phpView source
<?php
namespace Drupal\radioactivity;
/**
* Defines the incident storage interface.
*/
interface IncidentStorageInterface {
/**
* The key to identify the radioactivity incident storage.
*/
const STORAGE_KEY = 'radioactivity_incidents';
/**
* Adds an incident to the storage.
*
* @param \Drupal\radioactivity\IncidentInterface $incident
* The incident object.
*/
public function addIncident(IncidentInterface $incident);
/**
* Gets all incidents from the storage.
*
* @return \Drupal\radioactivity\IncidentInterface[]
* Array of incident objects.
*/
public function getIncidents();
/**
* Gets all incidents from the storage per entity type.
*
* @param string $entity_type
* Entity type for selection. Default to all entity types.
*
* @return \Drupal\radioactivity\IncidentInterface[][]
* Array of incident objects keyed by entity type (1st) and entity ID (2nd).
*/
public function getIncidentsByType($entity_type = '');
/**
* Clears the incident storage.
*/
public function clearIncidents();
/**
* Add endpoint settings to the page.
*
* @param array $page
* Page attachments as provided by hook_page_attachments_alter().
*/
public function injectSettings(array &$page);
}
Interfaces
Name | Description |
---|---|
IncidentStorageInterface | Defines the incident storage interface. |