Bugzilla – Attachment 127530 Details for
Bug 26636
Add objects.find Mojolicious helper
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26636: (QA follow-up) Add POD [20.11.x]
Bug-26636-QA-follow-up-Add-POD-2011x.patch (text/plain), 2.07 KB, created by
Tomás Cohen Arazi (tcohen)
on 2021-11-11 11:34:36 UTC
(
hide
)
Description:
Bug 26636: (QA follow-up) Add POD [20.11.x]
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2021-11-11 11:34:36 UTC
Size:
2.07 KB
patch
obsolete
>From d832cbc6ee817555b30863c2f40b7021eebff4ca Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 2 Feb 2021 16:22:07 -0300 >Subject: [PATCH] Bug 26636: (QA follow-up) Add POD [20.11.x] > >Sponsored-by: Virginia Polytechnic Institute and State University > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > Koha/REST/Plugin/Objects.pm | 30 ++++++++++++++++++++++-------- > 1 file changed, 22 insertions(+), 8 deletions(-) > >diff --git a/Koha/REST/Plugin/Objects.pm b/Koha/REST/Plugin/Objects.pm >index 18ba929984..02d4bd01da 100644 >--- a/Koha/REST/Plugin/Objects.pm >+++ b/Koha/REST/Plugin/Objects.pm >@@ -29,21 +29,23 @@ Koha::REST::Plugin::Objects > > =head2 Helper methods > >-=head3 objects.search >+=cut >+ >+sub register { >+ my ( $self, $app ) = @_; >+ >+=head3 objects.find > > my $patrons_rs = Koha::Patrons->new; >- my $patrons = $c->objects->search( $patrons_rs ); >+ my $patrons = $c->objects->find( $patrons_rs, $id ); > >-Performs a database search using given Koha::Objects object and query parameters. >+Performs a database search using given Koha::Objects object and the $id. > >-Returns an arrayref of the hashrefs representing the resulting objects >-for API rendering. >+Returns I<undef> if no object is found Returns the I<API representation> of >+the requested object. It passes through any embeds if specified. > > =cut > >-sub register { >- my ( $self, $app ) = @_; >- > $app->helper( > 'objects.find' => sub { > my ( $c, $result_set, $id ) = @_; >@@ -66,6 +68,18 @@ sub register { > } > ); > >+=head3 objects.search >+ >+ my $patrons_rs = Koha::Patrons->new; >+ my $patrons = $c->objects->search( $patrons_rs ); >+ >+Performs a database search using given Koha::Objects object and query parameters. >+ >+Returns an arrayref of the hashrefs representing the resulting objects >+for API rendering. >+ >+=cut >+ > $app->helper( > 'objects.search' => sub { > my ( $c, $result_set ) = @_; >-- >2.33.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 26636
:
111418
|
111419
|
116222
|
116223
|
116224
|
116225
|
116226
|
116227
|
116228
|
116229
|
116230
|
116231
|
116594
|
116595
|
116596
|
116597
|
116598
|
117669
|
117670
|
117671
|
117672
|
117673
|
127528
|
127529
| 127530 |
127531
|
127532