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.