Refactor mailpoet_get_subscribers_listings_in_segment_handlers to direct calls

[MAILPOET-3077]
This commit is contained in:
Rostislav Wolny
2020-09-14 16:37:03 +02:00
committed by Veljko V
parent f9f8428b42
commit 1a56b2534e
6 changed files with 29 additions and 109 deletions

View File

@ -1,16 +0,0 @@
<?php
namespace MailPoet\DynamicSegments\FreePluginConnectors;
use MailPoet\Listing\Handler;
use MailPoet\Models\DynamicSegment;
use MailPoet\Models\Segment;
class SubscribersListingsHandlerFactory {
public function get(Segment $segment, $data) {
if ($segment->type === DynamicSegment::TYPE_DYNAMIC) {
$listing = new Handler();
return $listingData = $listing->get('\MailPoet\Models\SubscribersInDynamicSegment', $data);
}
}
}