Skip to content

Commit 8124667

Browse files
iStrykerMateu Aguiló Bosch
authored and
Mateu Aguiló Bosch
committed
[FEAT] (Entity) #499: Support node reference
Add support to the node reference module.
1 parent 46e7252 commit 8124667

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

plugins/restful/RestfulEntityBase.php

+3
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,9 @@ protected function getTargetTypeFromEntityReference(\EntityMetadataWrapper $wrap
481481
elseif ($field['type'] == 'commerce_line_item_reference') {
482482
return 'commerce_line_item';
483483
}
484+
elseif ($field['type'] == 'node_reference') {
485+
return 'node';
486+
}
484487

485488
throw new \RestfulException(format_string('Field @property is not an entity reference or taxonomy reference field.', $params));
486489
}

0 commit comments

Comments
 (0)