add plugins filtering plugins and implement RemovePlugin PagePlugin
[scpubgit/App-SCS.git] / lib / App / SCS / Plugin / Core / PagePlugin / RemovePlugin.pm
CommitLineData
e2e7175f 1package App::SCS::Plugin::Core::PagePlugin::RemovePlugin;
2
3use Moo;
4
5with 'App::SCS::Role::PagePlugin';
6
7has name => (is => 'ro', required => 1);
8
9has plugin_map => (is => 'ro', required => 1);
10
11has class => (is => 'lazy', builder => sub {
12 my ($self) = @_;
13 $self->plugin_map->{$self->name}{class}
14});
15
16sub filter_plugins {
17 my ($self, $plugins) = @_;
18 [ grep !$_->isa($self->class), @$plugins ];
19}
20
211;