Refactor mailpoet_subscribers_in_segment_apply_bulk_action_handlers to direct calls
[MAILPOET-3077]
This commit is contained in:
committed by
Veljko V
parent
a42b3d6e3f
commit
bf053edbfb
@ -1,24 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace MailPoet\DynamicSegments\FreePluginConnectors;
|
||||
|
||||
use MailPoet\Listing\BulkActionController;
|
||||
use MailPoet\Listing\BulkActionFactory;
|
||||
use MailPoet\Listing\Handler;
|
||||
use MailPoet\Models\DynamicSegment;
|
||||
|
||||
class SubscribersBulkActionHandler {
|
||||
/**
|
||||
* @param array $segment
|
||||
* @param array $data
|
||||
*
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function apply(array $segment, array $data) {
|
||||
if ($segment['type'] === DynamicSegment::TYPE_DYNAMIC) {
|
||||
$bulkAction = new BulkActionController(new BulkActionFactory(), new Handler());
|
||||
return $bulkAction->apply('\MailPoet\Models\SubscribersInDynamicSegment', $data);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user