https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24228
Tomás Cohen Arazi <tomasco...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This patch introduces a |This patch introduces a release notes|parameter to the |parameter to the |Koha::Object class |Koha::Object class |('embed') that should be a |('embed') that should be a |hashref pointing to a data |hashref pointing to a data |structure following what's |structure following what's |documented in the code. |documented in the code. |This parameter allows the |This parameter allows the |caller to specify things to |caller to specify things to |embed recursively in the |embed recursively in the |API representation of the |API representation of the |object. For example: you |object. For example: you |could request a biblio |could request a biblio |object with its items |object with its items |attached, like this: |attached, like this: | | | | |$biblio_json = |$biblio_json = |$biblio->to_api({ embed => |$biblio->to_api({ embed => |{ items => {} } }); |{ items => {} } }); | | |The |The |main use of this is the |names specified for |API, as introduced by bug |embedding, are used as |24302. |attribute names on the | |resulting JSON object, and |Koha::Objects->to_api is |are expected to be class |adjusted to pass its |accessors. |parameters down to the | |Koha::Object. |The main use of | |this is the API, as | |introduced by bug 24302. | | | |Koha::Objects->to_api is | |adjusted to pass its | |parameters down to the | |Koha::Object. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/