Forums / Developer / Cascading object creation

Cascading object creation

Author Message

Andrew Kelly

Friday 21 July 2006 7:56:16 am

Hi all,

this may be in the forums somewhere already, but I honestly don't know
how to search for it. My apologies if I'm duplicating a query.

What I'd like to be able to accomplish is the following:
When creating and publishing an object, I would like to use
the value of specific attribute in that object to create an additional
object at the same time.

Is this in any way possible?

Andy

Kristof Coomans

Monday 24 July 2006 2:01:54 am

Hello Andy

You can create a workflow event to accomplish this. I've made something similar, but it copies an existing object under the newly published object ( http://ez.no/community/contribs/workflow/sck_cen_create_copy ).

You can probably use a content/edit extension handler instead ( see http://pubsvn.ez.no/nextgen/trunk/doc/features/3.8/content_edit_extension_handler.txt, settings/content.ini and kernel/classes/ezcontentobjectedithandler.php ).

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Andrew Kelly

Tuesday 25 July 2006 2:22:27 am

Hi Kristof,
thanks for your reply.

You can create a workflow event to accomplish this. I've made something similar, but it copies an existing object under the newly published object ( http://ez.no/community/contribs/workflow/sck_cen_create_copy ).

Your extension does look like it's really in the ball park, although it's not
exactly what I'm looking for. I think it can be tweaked, though, have to experiment a bit...

You can probably use a content/edit extension handler instead ( see http://pubsvn.ez.no/nextgen/trunk...8/content_edit_extension_handler.txt, settings/content.ini and kernel/classes/ezcontentobjectedithandler.php ).

Here I didn't have much luck, sorry. content_edit_extension_handler.txt says almost
nothing, and suggests reading setting/content.ini for more detail. But I found nothing
in settings/content.ini. And for whatever reason my installation doesn't even have
a settings/content.ini and kernel/classes/ezcontentobjectedithandler.php
(running 3.7.6 by the way).

Andy

Kristof Coomans

Tuesday 25 July 2006 9:47:27 am

(running 3.7.6 by the way).

Content edit extension handlers were introduced in eZ 3.8.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Andrew Kelly

Wednesday 26 July 2006 1:04:23 am

Figures.

I tried to upgrade to 3.8 several weeks ago and gave it up as impossible.
No matter how I approached it, the upgrade scripts chucked wobbly after wobbly.
And to be bloody honest, the new translation treatment is NOT a step forward.

Reckon I'll never have a choice in the matter, though. Upgrade or die...

Kristof Coomans

Wednesday 26 July 2006 1:15:18 am

Upgrade or die...

The second option sounds rather drastically :-)

You can still use the workflow approach with eZ 3.7.

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Andrew Kelly

Thursday 03 August 2006 1:44:12 am

To be honest, Kristof, I find it drastic as well, but in the opposite direction.

3.8 has some interesting bits that I'd love to have access to, but they come
at much too high a cost. Moving from 3.7 to 3.8 is most definately not a step
forward in my installations, but I'm forced to go that route to be able to enjoy
some bug fixes and feature additions.
At the risk of being insulting to the developers, it tastes like Microsoft and I'm
losing some trust in the whole package.
I'm beginning to re-think some upcoming projects.

eZ debug

Timing: Jan 18 2025 21:02:14
Script start
Timing: Jan 18 2025 21:02:14
Module start 'content'
Timing: Jan 18 2025 21:02:15
Module end 'content'
Timing: Jan 18 2025 21:02:15
Script end

Main resources:

Total runtime0.9476 sec
Peak memory usage4,096.0000 KB
Database Queries206

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0074 587.7109180.8359
Module start 'content' 0.00740.8297 768.5469605.1797
Module end 'content' 0.83710.1105 1,373.7266341.0625
Script end 0.9476  1,714.7891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00450.4790210.0002
Check MTime0.00140.1478210.0001
Mysql Total
Database connection0.00100.109210.0010
Mysqli_queries0.855690.29272060.0042
Looping result0.00210.21832040.0000
Template Total0.921797.320.4608
Template load0.00200.212320.0010
Template processing0.919697.048520.4598
Template load and register function0.00030.028810.0003
states
state_id_array0.00090.095210.0009
state_identifier_array0.00070.072620.0003
Override
Cache load0.00180.1949580.0000
Sytem overhead
Fetch class attribute can translate value0.00150.153830.0005
Fetch class attribute name0.00130.133290.0001
XML
Image XML parsing0.00180.192330.0006
class_abstraction
Instantiating content class attribute0.00000.0040140.0000
General
dbfile0.00360.3753330.0001
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 40
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs