Closed (fixed)
Project:
Entity API
Version:
7.x-1.x-dev
Component:
Code - misc
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Apr 2011 at 08:38 UTC
Updated:
21 Jun 2011 at 14:02 UTC
Jump to comment: Most recent file
Comments
Comment #1
damien tournoud commentedIt's an easy patch :)
Comment #2
bojanz commentedJust what the doctor ordered.
Comment #3
dave reidWouldn't you need to use
'load arguments' => array(1, 'myentity')?Comment #4
fagoad #3: I think the documented load arguments are fine.
@patch: Makes sense to me. However, we should also update the 'admin ui' provided with the entity API to make use of it. Thus, changing the default for 'menu wildcard' + updating the docs that ENTITY_TYPE_load() is not required any more should do it. (see entity.api.php).
I don't think we need this check, as reset() is fine with empty arrays and just returns FALSE.
Also, why do we need to catch exceptions here? Usually we don't do so?
Comment #5
bojanz commentedHere you go.
entity_object_load() could also be a wrapper around entity_load_single(), once #1027908: entity_load() should return entities keyed by ID, not name lands.
Comment #6
fagothanks, committed.
Comment #7
dave reidHrm, the load arguments still look wrong. According to the example, 'myentity' is going to be passed in as the entity_id and there is no value for the entity_type parameter.
Comment #8
damien tournoud commented'load arguments'is for additional arguments. The path part of the placeholder is always passed as the first argument.