コード例 #1
0
ファイル: DummyFactory.php プロジェクト: Ainschy/contao-core
 public function createRecipientSource(RecipientSource $recipientSourceData)
 {
     $recipientSource = new Dummy($recipientSourceData->getDummyMinCount(), $recipientSourceData->getDummyMaxCount());
     /** @var EventDispatcherInterface $eventDispatcher */
     $eventDispatcher = $GLOBALS['container']['event-dispatcher'];
     $event = new CreateRecipientSourceEvent($recipientSourceData, $recipientSource);
     $eventDispatcher->dispatch(CoreEvents::CREATE_RECIPIENT_SOURCE, $event);
     return $event->getRecipientSource();
 }