Forums / General / Class management

Class management

Author Message

Francis Poézévara

Tuesday 17 July 2007 8:17:35 am

Hello

I have a problem with the class management, and actually I don't know how to do what I want to do :D

I want to show on a webpage the content of "affairs". An "affair" has the following attribute : a project manager name and an unique affair name. Each affair can be composed of many "lots", which have the following attributes : date, number of components.

So for each affair, I want to show the project manager name, the affair name, and the attributes of all the lots of this affair...

I first tried to make a class Affair, with all the attributes, but the problem is that we don't know how many lots will be in an affair... So the best is to make two classes, one "affair" and one "lots". But how can I associate one affair with some lots, and print all the details on the page please ?

Thanks !

Heath

Tuesday 17 July 2007 11:49:25 am

Hello Francis,

Why not add an object relation (one or many separate content object associations within the single attribute) to your affair class?

This should allow you to simply add or remove lots from the content object's object relation list (lots attribute of the affair class) as you create and manage per content object (affair).

http://ez.no/doc/ez_publish/technical_manual/3_9/reference/datatypes/object_relation
http://ez.no/doc/content/advancedsearch?SearchText=object+relation&SubTreeArray[]=documentation&SearchPageLimit=5&SearchSectionID=18

Cheers!

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Francis Poézévara

Thursday 19 July 2007 2:22:00 am

Thanks, it solved all my problems :)

eZ debug

Timing: Jan 18 2025 15:59:12
Script start
Timing: Jan 18 2025 15:59:12
Module start 'content'
Timing: Jan 18 2025 15:59:12
Module end 'content'
Timing: Jan 18 2025 15:59:12
Script end

Main resources:

Total runtime0.6992 sec
Peak memory usage4,096.0000 KB
Database Queries194

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0049 587.5781180.8516
Module start 'content' 0.00490.5610 768.4297536.8828
Module end 'content' 0.56600.1332 1,305.3125332.7734
Script end 0.6992  1,638.0859 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.5379210.0002
Check MTime0.00140.1953210.0001
Mysql Total
Database connection0.00050.077710.0005
Mysqli_queries0.634790.77201940.0033
Looping result0.00200.28841920.0000
Template Total0.675296.620.3376
Template load0.00200.282620.0010
Template processing0.673396.287820.3366
Template load and register function0.00020.022310.0002
states
state_id_array0.00120.168310.0012
state_identifier_array0.00080.120620.0004
Override
Cache load0.00160.2324190.0001
Sytem overhead
Fetch class attribute can translate value0.00120.172230.0004
Fetch class attribute name0.00160.223440.0004
XML
Image XML parsing0.00090.133930.0003
class_abstraction
Instantiating content class attribute0.00000.002340.0000
General
dbfile0.00350.5055280.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs