CMSObjectEvent Module
The CMSObjectEvent module has the following event types:
CMSObjectPreCheckin
This event occurs before an object is checked in and before any supporting calls have been made. This event is similar to the precheckin ACL callback associated with the sess_add_callback function.
This event type is cancelable. If an event listener calls the preventDefault method, the checkin will be canceled. The event handler can perform a customized checkin itself and then cancel the default checkin by calling preventDefault and setting result to the result of the checkin.
|
Setting result without calling preventDefault will cause the result to be ignored and the default processing to proceed.
|
◦ Bubbles: Yes
◦ Cancelable: Yes
◦ Context Info: None
CMSObjectCheckin
This event occurs before an object is checked in and after some transactional and bursting calls have been made. Specifically, if the adapter supports transactions, a transaction will have been already started, and if the adapter specifies that objects should be burst on checkin then this bursting will already have occurred. If bursting modified the object contents, the object will also have been saved back to the repository.
This event is similar to the checkin ACL callback associated with the sess_add_callback function.
This event type is cancelable. If an event listener calls the preventDefault method, the checkin will be canceled. In this case, the pending transaction (if supported) will be rolled back.
The event handler can perform a customized checkin itself and then cancel the default checkin by calling preventDefault and setting result to the result of the checkin. In this case, the specified result will be used and the transaction will be committed.
|
Setting result without calling preventDefault will cause the result to be ignored and the default processing to proceed.
|
◦ Bubbles: Yes
◦ Cancelable: Yes
◦ Context Info: None
CMSObjectPostCheckin
This event occurs after an object has been checked in. As such, it is not cancelable. There is no equivalent ACL hook for this event.
The following module property provides the context information for this event:
result
◦ Represents the object that has been checked in.
▪ Bubbles: Yes
▪ Cancelable: No
▪ Context Info: result
CMSObjectCheckout
This event occurs before an object has been checked out. This event is similar to the lock ACL callback associated with the sess_add_callback function.
This event type is cancelable. If an event listener calls the preventDefault method, the checkout will be canceled. The event handler can perform a customized checkout itself and then cancel the default checkout by calling preventDefault and setting result to the result of the checkout.
|
Setting result without calling preventDefault will cause the result to be ignored and the default processing to proceed.
|
The following module property provides the context information for this event:
flags
Defined according to the flags parameter of the CMSObject.checkout method.
◦ Bubbles: Yes
◦ Cancelable: Yes
◦ Context Info: flags
CMSObjectPostCheckout
This event occurs after an object has been checked out. As such, it is not cancelable. There is no equivalent ACL hook for this event.
The following module property provides the context information for this event:
result
Represents the object that has been checked out.
◦ Bubbles: Yes
◦ Cancelable: Yes
◦ Context Info: result
CMSObjectCancelCheckout
This event occurs before an object's checkout has been canceled. This event is similar to the unlock ACL callback associated with the sess_add_callback function.
This event type is cancelable. If an event listener calls the preventDefault method, the checkout will remain. The event handler can perform a customized cancellation of the checkout itself and then cancel the default behavior by calling preventDefault and setting result to the result of the canceled checkout.
|
Setting result without calling preventDefault will cause the result to be ignored and the default processing to proceed.
|
◦ Bubbles: Yes
◦ Cancelable: Yes
◦ Context Info: None
CMSObjectPostCancelCheckout
This event occurs after an object's checkout has been canceled. As such, it is not cancelable. There is no equivalent ACL hook for this event.
The following module property provides the context information for this event:
result
Represents the object whose checkout has been canceled.
◦ Bubbles: Yes
◦ Cancelable: No
◦ Context Info: result
CMSObjectSave
This event occurs before an object has been saved. This event is similar to the save ACL callback associated with the sess_add_callback function.
This event type is cancelable. If an event listener calls the preventDefault method, the save will be canceled. The event handler can perform a customized save itself and then cancel the default save by calling preventDefault and setting result to the result of the save.
|
Setting result without calling preventDefault will cause the result to be ignored and the default processing to proceed.
|
The following module properties provide the context information for this event:
flags
Defined according to the flags parameter of the CMSObject.save method.
start
Along with end, represents the content being saved.
end
Along with start, represents the content being saved.
◦ Bubbles: Yes
◦ Cancelable: Yes
◦ Context Info: flags, start, end
CMSObjectPostSave
This event occurs after an object has been saved. As such, it is not cancelable. There is no equivalent ACL hook for this event.
The following module property provides the context information for this event:
result
Represents the object that has been saved.
◦ Bubbles: Yes
◦ Cancelable: No
◦ Context Info: result