]> git.koha-community.org Git - koha.git/commit
Bug 23770: Add Koha::Object(s)->to_api method
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 7 Oct 2019 18:55:09 +0000 (15:55 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 21 Oct 2019 09:03:44 +0000 (10:03 +0100)
commit3c0c75e6af321f02f7934979fbda0091578cfa8a
tree9ff2d23a1920695c4ddf606d010c6b0cf4aed10b
parentd7d5a40548c5adb918cd4b35706db0679e46b005
Bug 23770: Add Koha::Object(s)->to_api method

Generic method that changes the attribute names of an object in the
presence of the to_api_mapping method. It otherwise falls back to
returning the TO_JSON output.

This is WIP submitted early for scrutiny. Tests and example usage in an
API controller coming.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Object.pm
Koha/Objects.pm