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 :)

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 19:34:57
Script start
Timing: Jan 18 2025 19:34:57
Module start 'layout'
Timing: Jan 18 2025 19:34:57
Module start 'content'
Timing: Jan 18 2025 19:34:58
Module end 'content'
Timing: Jan 18 2025 19:34:58
Script end

Main resources:

Total runtime0.7972 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 587.7891152.6094
Module start 'layout' 0.00730.0030 740.398439.4063
Module start 'content' 0.01030.7853 779.8047531.8203
Module end 'content' 0.79560.0015 1,311.625012.1953
Script end 0.7972  1,323.8203 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4092160.0002
Check MTime0.00140.1728160.0001
Mysql Total
Database connection0.00090.118610.0009
Mysqli_queries0.748493.8765570.0131
Looping result0.00070.0868550.0000
Template Total0.758795.220.3794
Template load0.00270.338420.0013
Template processing0.756094.836820.3780
Template load and register function0.00030.042310.0003
states
state_id_array0.00100.122410.0010
state_identifier_array0.00120.148920.0006
Override
Cache load0.00180.2301190.0001
Sytem overhead
Fetch class attribute can translate value0.00060.080920.0003
Fetch class attribute name0.00100.127040.0003
XML
Image XML parsing0.00080.095120.0004
class_abstraction
Instantiating content class attribute0.00000.001040.0000
General
dbfile0.00100.1234170.0001
String conversion0.00000.001340.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/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
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: 6

Time used to render debug report: 0.0001 secs