IsActive.php
4 years ago
IsInstalled.php
4 years ago
IsNotActive.php
4 years ago
IsPluginActive.php
4 years ago
IsPluginNotActive.php
4 years ago
IsPluginNotActive.php
19 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AC\Integration\Filter; |
| 4 | |
| 5 | use AC\Integration; |
| 6 | use AC\Integration\Filter; |
| 7 | use AC\Integrations; |
| 8 | |
| 9 | class IsPluginNotActive implements Filter { |
| 10 | |
| 11 | public function filter( Integrations $integrations ) { |
| 12 | return new Integrations( array_filter( $integrations->all(), [ $this, 'is_not_active' ] ) ); |
| 13 | } |
| 14 | |
| 15 | private function is_not_active( Integration $integration ) { |
| 16 | return ! $integration->is_plugin_active(); |
| 17 | } |
| 18 | |
| 19 | } |