Bug 29764: Fix incorrect EmbedItems RecordProcessor filter POD

This patch makes the usage POD for the EmbedItems filter actually be
usable. The filter is used in opac-ISBDdetail.pl and the POD is updated
to how it is used there.

Not much to test.

Signed-off-by: David Cook <dcook@prosentient.com.au>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
This commit is contained in:
Tomás Cohen Arazi 2021-12-23 08:41:33 -03:00 committed by Fridolin Somers
parent cf77d0f7b2
commit 43abf06b64

View file

@ -28,21 +28,22 @@ my $biblio = Koha::Biblios->find(
{ prefetch => [ items, metadata ] }
);
my $rules = C4::Context->yaml_preference('OpacHiddenItems');
my $patron = Koha::Patrons->find($loggedinuser);
my @items = grep { !$_->hidden_in_opac({ rules => $rules }) @{$biblio->items};
my $record = $biblio->metadata->record;
my @items = $biblio->items->filter_by_visible_in_opac({ patron => $patron })->as_list;
my $processor = Koha::RecordProcessor->new(
my $record_processor = Koha::RecordProcessor->new(
{
filters => ('EmbedItems'),
filters => ['EmbedItems'],
options => {
items => \@items
interface => 'opac',
items => \@items
}
}
);
$processor->process( $record );
$record_processor->process($record);
=head1 DESCRIPTION