SproutCMS

This is the code documentation for the SproutCMS project

function logDelete()

Logs a delete action. This is a wrapper for Controller::logAction

Usage

int $Controller->logDelete ( string $table , int $record_id , array $data [, int $parent_log_id ] );

Arguments

  1. string $table
    The table which contained the deleted record
  2. int $record_id
    The id of the deleted record
  3. array $data
    The complete contents of the record which was deleted, i.e. [field => value],
           so it can be restored if necessary
  4. int $parent_log_id = 0
    ID of a parent log entry in the history_items table.
           This is used when multiple records are deleted by a single action.
           Undoing that action can then restore all of the deleted data.

Exceptions thrown

  • QueryException

Return value

  • int
    ID of the record inserted into the history_items table