<<

NAME

Koha::REST::Plugin::Objects

API

Helper methods

objects.search

    my $patrons_set = Koha::Patrons->new;
    my $patrons = $c->objects->search( $patrons_set, [\&to_model, \&to_api] );

Performs a database search using given Koha::Objects object and query parameters. It (optionally) applies the $to_model function reference before building the query itself, and (optionally) applies $to_api to the result.

Returns an arrayref of the hashrefs representing the resulting objects for JSON rendering.

Note: Make sure $to_model and $to_api don't autovivify keys.

<<