MIDDAG for Moodle

item_revision_service_interface

Contract for the revision service responsible for recording state transitions (create, update, delete) of items.

A revision always represents a transition between two states:

  • CREATE: old = null, new = item
  • UPDATE: old = item, new = item
  • DELETE: old = item, new = null

Implementations of this interface MUST:

  • Never modify item state
  • Never block CRUD operation
  • Persist only revision data
  • Be deterministic when possible

Table of Contents

Methods

create_revision()  : void
Records a revision according to the previous and new state.

Methods


        
On this page

Search results