Friday 15 June 2007 1:25:28 am
Hi. I'm working with a extension. With this extension, a registered used can add new content to database. I use
include_once( 'lib/ezutils/classes/ezoperationhandler.php' );
$operationResult = eZOperationHandler::execute( 'content', 'publish', array( 'object_id' => $contentObjectID,'version' => 1 ) );
but, how can i get the node_id of the contentobject i have added? I want the user be subscribed to this node he has created so i need the node id for doing something like
$user=&eZUser::currentuser();
include_once( 'kernel/classes/notification/handler/ezsubtree/ezsubtreenotificationrule.php' );
$rule=eZSubtreeNotificationRule::create($node,$user->attribute("contentobject_id"));
$rule->store();
Thank you.
|