|
Lines 167-173
sub get_template {
Link Here
|
| 167 |
CLASS => $self->{'class'}, |
167 |
CLASS => $self->{'class'}, |
| 168 |
METHOD => scalar $self->{'cgi'}->param('method'), |
168 |
METHOD => scalar $self->{'cgi'}->param('method'), |
| 169 |
PLUGIN_PATH => $self->get_plugin_http_path(), |
169 |
PLUGIN_PATH => $self->get_plugin_http_path(), |
| 170 |
PLUGIN_DIR => $self->get_plugin_dir(), |
170 |
PLUGIN_DIR => $self->bundle_path(), |
| 171 |
LANG => C4::Languages::getlanguage($self->{'cgi'}), |
171 |
LANG => C4::Languages::getlanguage($self->{'cgi'}), |
| 172 |
); |
172 |
); |
| 173 |
|
173 |
|
|
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 |
- |
|
|