|
Lines 139-149
sub InstallPlugins {
Link Here
|
| 139 |
|
139 |
|
| 140 |
Koha::Plugins::Methods->search({ plugin_class => $plugin_class })->delete(); |
140 |
Koha::Plugins::Methods->search({ plugin_class => $plugin_class })->delete(); |
| 141 |
|
141 |
|
| 142 |
foreach my $method ( @{ Class::Inspector->methods( $plugin_class, 'public' ) } ) { |
142 |
foreach my $method (@{Class::Inspector->methods( $plugin_class, 'public', 'full' )}){ |
|
|
143 |
my ( $method_class, $plugin_method ) = $method =~ /^(.*)::(.*)$/; |
| 144 |
|
| 145 |
# Skip method not directly owned by the plugin class |
| 146 |
next if (!$method_class || $method_class ne $plugin_class); |
| 147 |
|
| 143 |
Koha::Plugins::Method->new( |
148 |
Koha::Plugins::Method->new( |
| 144 |
{ |
149 |
{ |
| 145 |
plugin_class => $plugin_class, |
150 |
plugin_class => $plugin_class, |
| 146 |
plugin_method => $method, |
151 |
plugin_method => $plugin_method, |
| 147 |
} |
152 |
} |
| 148 |
)->store(); |
153 |
)->store(); |
| 149 |
} |
154 |
} |
| 150 |
- |
|
|