File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,14 @@ class MessageMetadataController extends EntityDefaultMetadataController {
51
51
'sanitize ' => TRUE ,
52
52
);
53
53
54
+ // Bypass entity_load() as we cannot use it here.
55
+ $ message_types = db_select ('message_type ' , 'mt ' )
56
+ ->fields ('mt ' )
57
+ ->execute ()
58
+ ->fetchAllAssoc ('name ' );
59
+
54
60
// Add in the arguments specific to the bundles.
55
- foreach (message_type_load () as $ name => $ type ) {
61
+ foreach ($ message_types as $ name => $ type ) {
56
62
$ info ['message ' ]['bundles ' ][$ name ]['properties ' ]['arguments ' ] = array (
57
63
'label ' => t ('Message arguments ' ),
58
64
'type ' => 'struct ' ,
@@ -61,7 +67,7 @@ class MessageMetadataController extends EntityDefaultMetadataController {
61
67
'setter callback ' => 'entity_property_verbatim_set ' ,
62
68
'property info ' => array (),
63
69
);
64
- $ keys = array_filter ($ type ->argument_keys );
70
+ $ keys = array_filter (unserialize ( $ type ->argument_keys ) );
65
71
foreach ($ keys as $ key ) {
66
72
// Add the argument keys so they can later be referenced by
67
73
// entity-metadata. For example if the message is "hello @foo", then
You can’t perform that action at this time.
0 commit comments