Closed (fixed)
Project:
Entity API
Version:
7.x-1.x-dev
Component:
Entity Metadata - core integration
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
8 Feb 2010 at 19:25 UTC
Updated:
12 Jan 2011 at 12:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
fagoIndeed, there is already basic support for the file entity itself though I didn't test that much yet.
Comment #2
fagoComment #3
fagoI took a stab on that and it turned out being more difficult/complex than necessary. So I had a look at improving the metadata wrappers and simplified the handling of nested data structures, as we have them for fields that are composed of multiple properties (e.g. file + description).
Metadata wrapper changes:
* value() now doesn't throw an exception for not set properties any more, but returns NULL.
* Fixed dealing with arrays as data structures without the necessity of wrapping it into another object.
* Added support to auto-create data structures to ease adding stuff, e.g. you can add a file now just by doing
$node->field_file[42]['file'] = $file;.Attached patch contains the metadata wrapper improvements + implements file field support.
Comment #4
fagoI've completed the patch to also add support for image fields + committed it.
Comment #5
fagobased on the improvements described in #3, I also improved the text-field integration to support summaries as well as text fields with summary without text processing + added tests for that.