Creating multiple object at the same time

Author Message

Marko Žmak

Sunday 06 November 2005 5:33:42 am

This is what I need:

Create an object. Create several objects that are children of that newly created object. But need to do it all in ONE form, and to be able to add children of the newly created node, while the object is still in edit mode.

Is this possible, and how?

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

Hubert Farnsworth

Gurudutt Verma

Wednesday 09 November 2005 1:58:52 am

Hi!

I haven't tried this but code shows that this is not possible to publish object below object which is not published yet.

Yes you can create an seperate module for this in which first you publish parent node and after that try to publish all the children but I dought if it will be possible to validate attributes of children node using this method :-(

Xavier Dutoit

Wednesday 09 November 2005 2:45:39 am

Hi,

Gurudutt Verma is right.

If you only have simple attributes (text, xmlarea, int...), you can write your own module, create the parent node, populate its attribute, publish it, create the children node, populate the attributes and publish them.

Have a look at the contrib (eg the ObjectCreator extension/ObjectCreator/modules/ObjectCreator/ezobjectcreator.php ) for the code.

X+

http://www.sydesy.com

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 19 2025 11:45:17
Script start
Timing: Jan 19 2025 11:45:17
Module start 'layout'
Timing: Jan 19 2025 11:45:17
Module start 'content'
Timing: Jan 19 2025 11:45:17
Module end 'content'
Timing: Jan 19 2025 11:45:17
Script end

Main resources:

Total runtime0.7389 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 589.2891152.6406
Module start 'layout' 0.00480.0023 741.929739.4766
Module start 'content' 0.00710.7305 781.4063582.3281
Module end 'content' 0.73760.0013 1,363.734412.1250
Script end 0.7389  1,375.8594 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.3982160.0002
Check MTime0.00120.1643160.0001
Mysql Total
Database connection0.00100.134810.0010
Mysqli_queries0.691393.5588590.0117
Looping result0.00050.0674570.0000
Template Total0.712596.420.3563
Template load0.00180.248120.0009
Template processing0.710796.172620.3553
Template load and register function0.00010.013010.0001
states
state_id_array0.00060.088010.0006
state_identifier_array0.00060.081120.0003
Override
Cache load0.00150.2003190.0001
Sytem overhead
Fetch class attribute can translate value0.00070.090330.0002
Fetch class attribute name0.00180.238960.0003
XML
Image XML parsing0.00270.362330.0009
class_abstraction
Instantiating content class attribute0.00000.001260.0000
General
dbfile0.00210.2888300.0001
String conversion0.00000.000940.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
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs