setDomainOnActivation(domain, event)

Documentation String

Set the permission id upon registration activation.

Let's see how this notifier can be used. First we need to create an event using the permission instance and a registration stub:

>>> class Registration:
...     def __init__(self, obj, name):
...         self.component = obj
... = name
>>> domain1 = TranslationDomain()
>>> domain1.domain
'<domain not activated>'
>>> import zope.component.interfaces
>>> event = zope.component.interfaces.Registered(
...     Registration(domain1, 'domain1'))

Now we pass the event into this function, and the id of the domain should be set to 'domain1'.

>>> setDomainOnActivation(domain1, event)
>>> domain1.domain