def addHook(self, hook, command): from Phoenix.Models import Hook hook = Hook(repository=self, hook=hook, command=command) return hook