Move dynamic segments from Premium plugin
[MAILPOET-2382]
This commit is contained in:
committed by
Jack Kitterhing
parent
0af9f09f50
commit
70a89b7939
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace MailPoet\Premium\DynamicSegments\FreePluginConnectors;
|
||||
|
||||
use MailPoet\Listing\BulkActionController;
|
||||
use MailPoet\Listing\BulkActionFactory;
|
||||
use MailPoet\Listing\Handler;
|
||||
use MailPoet\Premium\Models\DynamicSegment;
|
||||
|
||||
class SubscribersBulkActionHandler {
|
||||
|
||||
/**
|
||||
* @param array $segment
|
||||
* @param array $data
|
||||
*
|
||||
* @return array
|
||||
* @throws \Exception
|
||||
*/
|
||||
function apply(array $segment, array $data) {
|
||||
if ($segment['type'] === DynamicSegment::TYPE_DYNAMIC) {
|
||||
$bulkAction = new BulkActionController(new BulkActionFactory(), new Handler());
|
||||
return $bulkAction->apply('\MailPoet\Premium\Models\SubscribersInDynamicSegment', $data);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user