hooks/test/data/hooks.py
author Denis Laxalde <denis.laxalde@logilab.fr>
Tue, 21 Jun 2016 15:32:51 +0200
changeset 11298 b1e7de000536
parent 11084 ffd615e626f9
permissions -rw-r--r--
[pkg] Version 3.22.3

from cubicweb.predicates import is_instance
from cubicweb.hooks import notification


class FolderUpdateHook(notification.EntityUpdateHook):
    __select__ = (notification.EntityUpdateHook.__select__ &
                  is_instance('Folder'))
    order = 100  # late trigger so that metadata hooks come before.