Information collected id

Author Message

David Santiso

Saturday 12 February 2011 9:34:58 am

Hi,

I've seen the identifiers of the information collected does not increase as its object. For example:

Object 1 Form 1 -> Information collected 1, Information collected 2, Information collected 5...

Object 2 Form 2 -> Information collected 3, Information collected 4, Information collected 6...

Thus it is impossible to find the information collected from a particular object.

Also if I delete a group of information collected, the identifiers do not restart.

Have anyone any idea how I can display all the information collected from an object?

Tanks,

David

Thiago Campos Viana

Saturday 12 February 2011 11:36:25 am

Hi David, you could check the docs:

http://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Modules/content/Fetch-functions/collected_info_collection

All functions that retrieves database information are on fetch functions group.

{def $collection=fetch( 'content', 'collected_info_collection',
                        hash( 'collection_id',    123,
                              'contentobject_id', 456 ) )}
 
{foreach $collection.attributes as $attribute}
    {$attribute.contentclass_attribute_name} <br />
{/foreach}

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

David Santiso

Saturday 12 February 2011 12:15:14 pm

Thanks, but I think you haven't understood my question.

Yes, I have tried this already, but it's not what I want.

This function returns only the data set collected with ID 123, bbut I want all collections of an object. For example an object with ID 456.

Thiago Campos Viana

Saturday 12 February 2011 1:14:39 pm

You could create a template operator or a template fetch function, here's the php code to fetch collections:

$collections = eZInformationCollection::fetchCollectionsList( $objectID, /* object id */
                                                              false, /* creator id */
                                                              false, /* user identifier */
                                                              array( 'limit' => $limit,'offset' => $offset ) /* limit array */ );
$numberOfCollections = eZInformationCollection::fetchCollectionsCount( $objectID );

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

David Santiso

Saturday 12 February 2011 2:05:40 pm

Thanks, but where I have to create them?

Thiago Campos Viana

Saturday 12 February 2011 2:47:16 pm

Here: http://share.ez.no/learn/ez-publish/an-introduction-to-developing-ez-publish-extensions

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

David Santiso

Sunday 13 February 2011 3:11:21 am

Thank you very much.

David Santiso

Sunday 13 February 2011 5:24:49 am

I've to create a full extension for one fetch function?

If I just want to add a new fetch function or edit an existing one,where is it?

Peter Keung

Sunday 13 February 2011 2:37:29 pm

Here is some documentation for the template fetch function content / collected_info_list:

https://github.com/ezsystems/ezpublish/blob/master/doc/features/3.8/infocollector_fetchfunctions.txt

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

David Santiso

Monday 14 February 2011 12:27:36 am

Hi Peter,

This fetch function doesn't appear in "doc.ez.no". Does exists it in version 4.4? I think that is exactly what I need.

Thanks,

David

Marko Žmak

Tuesday 15 February 2011 3:33:11 am

David, the collected_info_list function is still available in 4.4, but it's strange that it's not in the docs?

eZ Crew, what's with the docs for this one?

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

Hubert Farnsworth

Amine BETARI

Monday 14 March 2011 10:32:39 am

Consider creating an operator, simply send as parameters the id of the object
and in PHP you can do your own query

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 02:48:09
Script start
Timing: Jan 18 2025 02:48:09
Module start 'layout'
Timing: Jan 18 2025 02:48:09
Module start 'content'
Timing: Jan 18 2025 02:48:09
Module end 'content'
Timing: Jan 18 2025 02:48:09
Script end

Main resources:

Total runtime0.0141 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 589.0469152.6250
Module start 'layout' 0.00520.0021 741.671939.4531
Module start 'content' 0.00740.0047 781.1250102.0547
Module end 'content' 0.01200.0021 883.179746.2891
Script end 0.0141  929.4688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002517.8638140.0002
Check MTime0.00117.8502140.0001
Mysql Total
Database connection0.00096.190510.0009
Mysqli_queries0.001610.974130.0005
Looping result0.00000.084210.0000
Template Total0.001812.510.0018
Template load0.00096.183810.0009
Template processing0.00096.246110.0009
Override
Cache load0.00064.396010.0006
General
dbfile0.00031.885580.0000
String conversion0.00000.048940.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs