[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
Mon Dec 30 19:08:33 CET 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24228
Tomás Cohen Arazi <tomascohen at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #96645|0 |1
is obsolete| |
--- Comment #11 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 96685
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96685&action=edit
Bug 24228: Make ->to_api params a hashref
This patch makes the parameters for Koha::Object(s)->to_api a hashref
preparing the ground for new parameters. The proposed syntax is:
$object->to_api(
{
embed => {
'items' => {
'children' => {
'homebranch' => {}
}
}
}
}
);
Tests are added for the Koha::Objects implementation and tests for
Koha::Object are adjusted to the new syntax, and a test for the single
result accessor is added as well.
To test:
1. Apply this patches
2. Run:
$ kshell
k$ prove t/db_dependent/Koha/Object.t t/db_dependent/Koha/Objects.t
=> SUCCESS: Tests pass!
3. Sign off :-D
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list