hooks/test/data/hooks.py
author Julien Cristau <julien.cristau@logilab.fr>
Fri, 12 Feb 2016 10:39:14 +0100
changeset 11105 2a8884f3be3d
parent 11084 ffd615e626f9
permissions -rw-r--r--
[pkg] 3.22.1

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.