Lines 197-202
the field values 'value' for that field. Example where field_id = 2 is the only
Link Here
|
197 |
sub get_additional_field_values_for_template { |
197 |
sub get_additional_field_values_for_template { |
198 |
my ($self) = @_; |
198 |
my ($self) = @_; |
199 |
|
199 |
|
|
|
200 |
$self->_update_marc_get_fields(); |
200 |
my $additional_field_ids = $self->additional_field_values->search( |
201 |
my $additional_field_ids = $self->additional_field_values->search( |
201 |
{}, |
202 |
{}, |
202 |
{ |
203 |
{ |
Lines 215-220
sub get_additional_field_values_for_template {
Link Here
|
215 |
return \%fields; |
216 |
return \%fields; |
216 |
} |
217 |
} |
217 |
|
218 |
|
|
|
219 |
=head3 _update_marc_get_fields |
220 |
|
221 |
Update additional field in db according to their marc value |
222 |
|
223 |
$self->_update_marc_get_fields() |
224 |
|
225 |
=cut |
226 |
|
227 |
sub _update_marc_get_fields { |
228 |
my ($self) = @_; |
229 |
my $tablename = $self->_result->table; |
230 |
my @additional_fields = Koha::AdditionalFields->search( |
231 |
{ |
232 |
tablename => $tablename, |
233 |
marcfield_mode => 'get', |
234 |
-not => { marcfield => undef }, |
235 |
-not => { marcfield => '' } |
236 |
} |
237 |
)->get_column('id'); |
238 |
my @additional_get_fields = map { { id => $_ } } @additional_fields; |
239 |
$self->set_additional_fields( \@additional_get_fields ); |
240 |
} |
241 |
|
218 |
=head3 additional_field_values |
242 |
=head3 additional_field_values |
219 |
|
243 |
|
220 |
Returns additional field values |
244 |
Returns additional field values |
221 |
- |
|
|