publish a hide object

Author Message

K C

Monday 17 October 2005 3:05:34 am

Hi,

for publishing my object I use :

include_once( 'lib/ezutils/classes/ezoperationhandler.php' );
$operationResult = eZOperationHandler::execute( 'content', 'publish', array( 'object_id' => $contentObjectID,
'version' => $contentObjectVersion ) );

Now I want the first it runs that the content will be hidden in the contenttree (so the objects are still there, the user can unhide the object)

The $operationResult['status'] is now always 1, how can reset it to 3 (archived) ?

Thanks a lot,

KC

K C

Monday 17 October 2005 6:24:38 am

Okay, I've found the answer :

eZContentObjectTreeNode::hideSubTree( $contentObject->attribute('main_node') );

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

eZ debug

Timing: Jan 18 2025 22:37:53
Script start
Timing: Jan 18 2025 22:37:53
Module start 'layout'
Timing: Jan 18 2025 22:37:53
Module start 'content'
Timing: Jan 18 2025 22:37:54
Module end 'content'
Timing: Jan 18 2025 22:37:54
Script end

Main resources:

Total runtime0.6764 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 589.3203152.6094
Module start 'layout' 0.00520.0031 741.929739.4141
Module start 'content' 0.00820.6666 781.3438423.0391
Module end 'content' 0.67480.0016 1,204.38288.1875
Script end 0.6764  1,212.5703 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.5033160.0002
Check MTime0.00140.2062160.0001
Mysql Total
Database connection0.00070.108510.0007
Mysqli_queries0.638694.4099520.0123
Looping result0.00060.0918500.0000
Template Total0.648995.920.3244
Template load0.00190.285620.0010
Template processing0.646995.636120.3235
Template load and register function0.00020.022910.0002
states
state_id_array0.00080.110910.0008
state_identifier_array0.00100.141220.0005
Override
Cache load0.00160.2373150.0001
Sytem overhead
Fetch class attribute can translate value0.00060.086810.0006
Fetch class attribute name0.00080.122720.0004
XML
Image XML parsing0.00010.013910.0001
class_abstraction
Instantiating content class attribute0.00000.000720.0000
General
dbfile0.00070.1031100.0001
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs