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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.