Commit | Line | Data |
---|---|---|
e2e7175f | 1 | package App::SCS::Plugin::Core::PagePlugin::RemovePlugin; |
2 | ||
3 | use Moo; | |
4 | ||
5 | with 'App::SCS::Role::PagePlugin'; | |
6 | ||
7 | has name => (is => 'ro', required => 1); | |
8 | ||
9 | has plugin_map => (is => 'ro', required => 1); | |
10 | ||
11 | has class => (is => 'lazy', builder => sub { | |
12 | my ($self) = @_; | |
13 | $self->plugin_map->{$self->name}{class} | |
14 | }); | |
15 | ||
16 | sub filter_plugins { | |
17 | my ($self, $plugins) = @_; | |
18 | [ grep !$_->isa($self->class), @$plugins ]; | |
19 | } | |
20 | ||
21 | 1; |