Fetch Object Function for Collected Information

Author Message

Paul Wilson

Saturday 25 February 2006 5:32:30 pm

<b>Suggestion:</b> A "Fetch" function that returns a selected series of objects from Collected Information (eg by attribute_id, attribute value, user_id, or time).

<b>Why:</b>
Current Fetch functions for collected information only count totals (ie "collected_info_count" and "collected_info_count_list") - they don't allow selection of a series of collected information objects, only individual objects by content object id (ie "collected_info_collection"). This means you need to do a lot of processing to know what objects you want before you can do anything with them. Although it is possible to achieve the outcome in other ways, a Fetch function to get one or more objects by different criteria would enable:

- For polls, showing a registered user what they've voted for.
- Histories and summaries of user Poll / form responses.
- Advanced user interaction and information handling

<b>How:</b>
It seems likely that the functions are probably already written and just need to be adapted to this purpose -

1) The file "/kernel/classes/ezinformationcollection.php" contains a function called "fetchByUserIdentifier" which "fetches the information collection by user identifier" (line 419). Perhaps there is a way to access this?

2) Create a simple (?) adaptation of Fetch function that applies to the collected information SQL tables?

<b>Evidence of Need / Issue</b>
This topic has come up a number of times in the forums, for example:
- http://ez.no/community/forum/developer/polls_fetch_to_display_user_s_vote_value
- http://ez.no/community/forum/setup_design/how_to_fetch_collected_info_list
- http://ez.no/community/forum/setup_design/collected_infp_collection_data_fetching
- http://ez.no/community/forum/setup_design/information_collection_help_me_please
- http://ez.no/community/forum/setup_design/information_collection_data_stored

Is this possible, or perhaps already planned? Has anyone else identified this as valuable "nice to have" or "must have" feature?

Piotrek Karaƛ

Thursday 01 November 2007 1:55:55 pm

Exactly my thought, just four and a half years later ;)
Is there any particular reason behind keeping the collected info fetch function list so short?

The information collection mechanism is very handy in a number of situations. While custom operator or fetch function will solve the issue, it would be nice to have some more possibilities out of the box ;)

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

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 14:55:16
Script start
Timing: Jan 18 2025 14:55:16
Module start 'layout'
Timing: Jan 18 2025 14:55:16
Module start 'content'
Timing: Jan 18 2025 14:55:16
Module end 'content'
Timing: Jan 18 2025 14:55:16
Script end

Main resources:

Total runtime0.5517 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 588.0469152.6406
Module start 'layout' 0.00660.0050 740.687539.4922
Module start 'content' 0.01160.5387 780.1797540.2188
Module end 'content' 0.55030.0013 1,320.398412.4375
Script end 0.5517  1,332.8359 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.6680160.0002
Check MTime0.00160.2827160.0001
Mysql Total
Database connection0.00090.157510.0009
Mysqli_queries0.496990.0598540.0092
Looping result0.00060.1060520.0000
Template Total0.517693.820.2588
Template load0.00230.416920.0012
Template processing0.515393.392220.2576
Template load and register function0.00010.017910.0001
states
state_id_array0.00070.125610.0007
state_identifier_array0.00070.121620.0003
Override
Cache load0.00190.3398270.0001
Sytem overhead
Fetch class attribute can translate value0.00070.120520.0003
Fetch class attribute name0.00130.235440.0003
XML
Image XML parsing0.00100.189020.0005
class_abstraction
Instantiating content class attribute0.00010.020740.0000
General
dbfile0.00180.3194230.0001
String conversion0.00000.004040.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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/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: 17
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs