interface AuditLogEventInterface in Audit Log 8
Same name and namespace in other branches
- 8.2 src/AuditLogEventInterface.php \Drupal\audit_log\AuditLogEventInterface
Represents a single auditable event for logging.
@package Drupal\audit_log
Hierarchy
- interface \Drupal\audit_log\AuditLogEventInterface
Expanded class hierarchy of AuditLogEventInterface
All classes that implement AuditLogEventInterface
5 files declare their use of AuditLogEventInterface
- Database.php in src/StorageBackend/ Database.php 
- EventSubscriberInterface.php in src/EventSubscriber/ EventSubscriberInterface.php 
- Node.php in src/EventSubscriber/ Node.php 
- StorageBackendInterface.php in src/StorageBackend/ StorageBackendInterface.php 
- User.php in src/EventSubscriber/ User.php 
File
- src/AuditLogEventInterface.php, line 13 
Namespace
Drupal\audit_logView source
interface AuditLogEventInterface {
  /**
   * Stores the user that triggers the audit event.
   *
   * @param \Drupal\Core\Session\AccountInterface $user
   *   The user object of the user performing an action to be logged.
   *
   * @return AuditLogEventInterface
   *   The current instance of the object.
   */
  public function setUser(AccountInterface $user);
  /**
   * Stores the entity that triggered the audit event.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The entity being modified.
   *
   * @return AuditLogEventInterface
   *   The current instance of the object.
   */
  public function setEntity(EntityInterface $entity);
  /**
   * Stores the untranslated audit message to write to the log.
   *
   * @param string $message
   *   The untranslated audit message.
   *
   * @return AuditLogEventInterface
   *   The current instance of the object.
   */
  public function setMessage($message);
  /**
   * Stores the replacement tokens for the log message.
   *
   * @param array $variables
   *   The array of replacement tokens.
   *
   * @return AuditLogEventInterface
   *   The current instance of the event.
   */
  public function setMessagePlaceholders($variables);
  /**
   * Stores the type of event being reported.
   *
   * @param string $event_type
   *   The type of event being reported.
   *   Example: "insert", "update", "delete".
   *
   * @return AuditLogEventInterface
   *   The current instance of the object.
   */
  public function setEventType($event_type);
  /**
   * Stores the original state of the object before the event occurred.
   *
   * @param string $state
   *   The name of the object state such as "published" or "active".
   *
   * @return AuditLogEventInterface
   *   The current instance of the object.
   */
  public function setPreviousState($state);
  /**
   * Stores the new state of the object after the event occurred.
   *
   * @param string $state
   *   The name of the object state such as "published" or "active".
   *
   * @return AuditLogEventInterface
   *   The current instance of the object.
   */
  public function setCurrentState($state);
  /**
   * Sets the timestamp for the event request.
   *
   * @param int $request_time
   *   The timestamp of the request.
   *
   * @return \Drupal\audit_log\AuditLogEventInterface
   *   The current instance of the object.
   */
  public function setRequestTime($request_time);
  /**
   * Retrieves the user object for the user that triggered the event.
   *
   * @return \Drupal\Core\Session\AccountInterface
   *   The user object for the user that triggered the event.
   */
  public function getUser();
  /**
   * Retrieves the entity that was modified.
   *
   * @return \Drupal\Core\Entity\EntityInterface
   *   The entity that was modified.
   */
  public function getEntity();
  /**
   * Retrieves the untranslated audit log message for the event.
   *
   * @return string
   *   The untranslated audit log message.
   */
  public function getMessage();
  /**
   * Retrieves the replacement tokens for the log message.
   *
   * @return array
   *   The replacement tokens for the log message.
   */
  public function getMessagePlaceholders();
  /**
   * Retrieves the type of event that was triggered.
   *
   * @return string
   *   The type of event such as "insert", "update", "delete".
   */
  public function getEventType();
  /**
   * Retrieves the original state of the object before the event occurred.
   *
   * @return string
   *   The name of the object state such as "published" or "active".
   */
  public function getPreviousState();
  /**
   * Retrieves the new state of the object after the event occurred.
   *
   * @return string
   *   The name of the object state such as "published" or "active".
   */
  public function getCurrentState();
  /**
   * The timestamp for when the event was initiated.
   *
   * @return int
   */
  public function getRequestTime();
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| AuditLogEventInterface:: | public | function | Retrieves the new state of the object after the event occurred. | 1 | 
| AuditLogEventInterface:: | public | function | Retrieves the entity that was modified. | 1 | 
| AuditLogEventInterface:: | public | function | Retrieves the type of event that was triggered. | 1 | 
| AuditLogEventInterface:: | public | function | Retrieves the untranslated audit log message for the event. | 1 | 
| AuditLogEventInterface:: | public | function | Retrieves the replacement tokens for the log message. | 1 | 
| AuditLogEventInterface:: | public | function | Retrieves the original state of the object before the event occurred. | 1 | 
| AuditLogEventInterface:: | public | function | The timestamp for when the event was initiated. | 1 | 
| AuditLogEventInterface:: | public | function | Retrieves the user object for the user that triggered the event. | 1 | 
| AuditLogEventInterface:: | public | function | Stores the new state of the object after the event occurred. | 1 | 
| AuditLogEventInterface:: | public | function | Stores the entity that triggered the audit event. | 1 | 
| AuditLogEventInterface:: | public | function | Stores the type of event being reported. | 1 | 
| AuditLogEventInterface:: | public | function | Stores the untranslated audit message to write to the log. | 1 | 
| AuditLogEventInterface:: | public | function | Stores the replacement tokens for the log message. | 1 | 
| AuditLogEventInterface:: | public | function | Stores the original state of the object before the event occurred. | 1 | 
| AuditLogEventInterface:: | public | function | Sets the timestamp for the event request. | 1 | 
| AuditLogEventInterface:: | public | function | Stores the user that triggers the audit event. | 1 | 
