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

(-)a/Koha/Plugins/Base.pm (-18 / +1 lines)
Lines 168-174 sub get_template { Link Here
168
        CLASS       => $self->{'class'},
168
        CLASS       => $self->{'class'},
169
        METHOD      => scalar $self->{'cgi'}->param('method'),
169
        METHOD      => scalar $self->{'cgi'}->param('method'),
170
        PLUGIN_PATH => $self->get_plugin_http_path(),
170
        PLUGIN_PATH => $self->get_plugin_http_path(),
171
        PLUGIN_DIR  => $self->get_plugin_dir(),
171
        PLUGIN_DIR  => $self->bundle_path(),
172
    );
172
    );
173
173
174
    return $template;
174
    return $template;
Lines 215-236 sub get_plugin_http_path { Link Here
215
    return "/plugin/" . join( '/', split( '::', $self->{'class'} ) );
215
    return "/plugin/" . join( '/', split( '::', $self->{'class'} ) );
216
}
216
}
217
217
218
=head2 get_plugin_dir
219
220
To [% INCLUDE %] another TT template from a template, an absolute path to the
221
template is required. This method returns that absolute file system path.
222
223
usage: my $path = $self->get_plugin_dir();
224
225
=cut
226
227
sub get_plugin_dir {
228
    my ($self) = @_;
229
230
    my $base = C4::Context->config('pluginsdir');
231
    return "$base/" . join( '/', split( '::', $self->{'class'} ) );
232
}
233
234
=head2 go_home
218
=head2 go_home
235
219
236
   go_home is a quick redirect to the Koha plugins home page
220
   go_home is a quick redirect to the Koha plugins home page
237
- 

Return to bug 23237