View | Details | Raw Unified | Return to bug 37389
Collapse All | Expand All

(-)a/Koha/ILL/Request.pm (-1 / +29 lines)
Lines 2220-2225 sub get_staff_table_actions { Link Here
2220
    return $ill_table_actions;
2220
    return $ill_table_actions;
2221
}
2221
}
2222
2222
2223
=head3 AUTOLOAD
2224
2225
=cut
2226
2227
our $AUTOLOAD;
2228
2229
sub AUTOLOAD {
2230
    my ($self) = @_;
2231
2232
    my $name = $AUTOLOAD;
2233
    $name =~ s/.*:://;    # Remove package name
2234
2235
    if ( $name =~ /^extended_attributes_(\w+)$/ ) {
2236
        my $type = $1;
2237
2238
        # Define the method dynamically
2239
        no strict 'refs';
2240
        *{$AUTOLOAD} = sub {
2241
            my ($self)   = @_;
2242
            my $relation = 'extended_attributes_' . $type;
2243
            my $rs       = $self->_result->$relation;
2244
            return Koha::ILL::Request::Attributes->_new_from_dbic($rs)->search;
2245
        };
2246
2247
        # Call the newly defined method
2248
        return $self->$name();
2249
    }
2250
}
2251
2223
=head3 _type
2252
=head3 _type
2224
2253
2225
=cut
2254
=cut
2226
- 

Return to bug 37389