<<

NAME

Koha::Filter::MARC::EmbedItems - Appends item information on MARC::Record objects.

SYNOPSIS

my $biblio = Koha::Biblios->find( $biblio_id, { prefetch => [ items, metadata ] } );

my $opachiddenitems_rules; eval { my $yaml = C4::Context->preference('OpacHiddenItems') . "\n\n"; $opachiddenitems_rules = YAML::Load($yaml); };

my @items = grep { !$_->hidden_in_opac({ rules => $opachiddenitems_rules }) @{$biblio->items}; my $record = $biblio->metadata->record;

my $processor = Koha::RecordProcessor->new( { filters => ('EmbedItems'), options => { items => \@items } } );

$processor->process( $record );

DESCRIPTION

Filter to embed items information into MARC::Record objects.

filter

Embed items into the MARC::Record object.

<<