Move dynamic segments from Premium plugin

[MAILPOET-2382]
This commit is contained in:
Jan Jakeš
2019-10-03 09:37:46 +02:00
committed by Jack Kitterhing
parent 0af9f09f50
commit 70a89b7939
41 changed files with 2674 additions and 0 deletions

View File

@ -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);
}
}
}