doc/book/fr/14-hooks.fr.txt
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 20 May 2010 20:50:03 +0200
changeset 5558 afd1face1faf
parent 93 9c919a47e140
permissions -rw-r--r--
[schema migration] make some stuff to ease file 1.9 migration : we want to kill the Image entity so that existing image are turned into (existing entity type) File entities

.. -*- coding: utf-8 -*-

Les crochets (*hooks*)
======================

XXX FILLME

Les crochets sont appelés avant ou après la mise à jour d'une entité ou d'une
relations dans le dépot

Leur prototypes sont les suivants


    * after_add_entity     (session, entity)
    * after_update_entity  (session, entity)
    * after_delete_entity  (session, eid)
    * before_add_entity    (session, entity)
    * before_update_entity (session, entity)
    * before_delete_entity (session, eid)

    * after_add_relation     (session, fromeid, rtype, toeid)
    * after_delete_relation  (session, fromeid, rtype, toeid)
    * before_add_relation    (session, fromeid, rtype, toeid)
    * before_delete_relation (session, fromeid, rtype, toeid)
    
    * server_startup
    * server_shutdown
    
    * session_open
    * session_close