Share » Forums » Developer » How to assign nodes using PHP

How to assign nodes using PHP

How to assign nodes using PHP

Friday 30 July 2004 2:29:07 am - 4 replies

Modified on Friday 30 July 2004 2:36:37 am by Eirik Alfstad Johansen

Author Message

Paul Forsyth

Friday 30 July 2004 2:35:14 am

You need to publish the object:

$operationResult = eZOperationHandler::execute( 'content', 
                                                'publish',
                                                array( 'object_id' => $object['id'],
                                                       'version' => $object['current_version']) );

paul

--
http://www.visionwt.com

Eirik Alfstad Johansen

Friday 30 July 2004 2:52:24 am

Hi Paul,

But shouldn't the object already be published since the event is run on the content|publish|after trigger?

Sincerely,

Eirik Johansen
http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Eirik Alfstad Johansen

Friday 30 July 2004 2:58:02 am

BTW, it did, of course, work.

Thanks a lot, Paul!

Sincerely,

Eirik Johansen
http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Paul Forsyth

Friday 30 July 2004 3:13:49 am

I see, i thought at first you were creating a new object...

Running the excute will update the object with a new version i believe.

But just a simple store() should work i think. If you run store, without the execute, can you see the db row in ezcontentobject_tree corresponding to your new entry?

eZ, can you comment?

paul

--
http://www.visionwt.com

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu