Forums / Suggestions / Fetch Object Function for Collected Information

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

eZ debug

Timing: Jan 18 2025 10:21:36
Script start
Timing: Jan 18 2025 10:21:36
Module start 'content'
Timing: Jan 18 2025 10:21:37
Module end 'content'
Timing: Jan 18 2025 10:21:37
Script end

Main resources:

Total runtime0.6196 sec
Peak memory usage4,096.0000 KB
Database Queries191

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0103 588.9766180.8125
Module start 'content' 0.01030.4801 769.7891545.3125
Module end 'content' 0.49040.1292 1,315.1016334.8594
Script end 0.6196  1,649.9609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.6583210.0002
Check MTime0.00140.2322210.0001
Mysql Total
Database connection0.00240.381010.0024
Mysqli_queries0.546588.19371910.0029
Looping result0.00180.28911890.0000
Template Total0.583894.220.2919
Template load0.00200.329920.0010
Template processing0.581793.869820.2908
Template load and register function0.00010.021810.0001
states
state_id_array0.00090.153010.0009
state_identifier_array0.00140.218020.0007
Override
Cache load0.00170.2753270.0001
Sytem overhead
Fetch class attribute can translate value0.00120.196130.0004
Fetch class attribute name0.00170.269940.0004
XML
Image XML parsing0.00260.417430.0009
class_abstraction
Instantiating content class attribute0.00000.001240.0000
General
dbfile0.00610.9774340.0002
String conversion0.00000.001330.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
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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs