Forums / Developer / detect new objects in edit handler

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

detect new objects in edit handler

Author Message

Marko Žmak

Monday 05 July 2010 10:22:49 am

I have created a custom edit handler that extends eZContentObjectEditHandler and I would like to detect in it if the object being edited is a newly created object, or an existing object that is being reedited. I'm using this code:

$isNewObject = $contentObjectVersion == 1;

Is there a more proper way to do it or this is it?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth