[Koha-bugs] [Bug 24228] Add a parameter to recursively embed objects in Koha::Object(s)->to_api

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jan 8 16:22:34 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24228

Tomás Cohen Arazi <tomascohen at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Text to go in the|                            |This patch introduces a
      release notes|                            |parameter to the
                   |                            |Koha::Object class
                   |                            |('embed') that should be a
                   |                            |hashref pointing to a data
                   |                            |structure following what's
                   |                            |documented in the code.
                   |                            |This parameter allows the
                   |                            |caller to specify things to
                   |                            |embed recursively in the
                   |                            |API representation of the
                   |                            |object. For example: you
                   |                            |could request a biblio
                   |                            |object with its items
                   |                            |attached, like this:
                   |                            |
                   |                            |
                   |                            |$biblio_json =
                   |                            |$biblio->to_api({ embed =>
                   |                            |{ items => {} } });
                   |                            |
                   |                            |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.


More information about the Koha-bugs mailing list