cubicweb/hooks/test/data/hooks.py
branch3.26
changeset 12432 2fcb53ee5178
parent 11129 97095348b3ee
equal deleted inserted replaced
12431:a570191d67b0 12432:2fcb53ee5178
     1 from cubicweb.predicates import is_instance
     1 from cubicweb.predicates import is_instance
     2 from cubicweb.hooks import notification
     2 from cubicweb.hooks import notification
     3 
     3 
     4 
     4 
     5 class FolderUpdateHook(notification.EntityUpdateHook):
     5 class FolderUpdateHook(notification.EntityUpdateHook):
     6     __select__ = (notification.EntityUpdateHook.__select__ &
     6     __select__ = (notification.EntityUpdateHook.__select__
     7                   is_instance('Folder'))
     7                   & is_instance('Folder'))
     8     order = 100  # late trigger so that metadata hooks come before.
     8     order = 100  # late trigger so that metadata hooks come before.