Last active
December 12, 2015 02:49
-
-
Save radmiraal/4702373 to your computer and use it in GitHub Desktop.
A completely untested possible way of registering plugins in swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class CommandController { | |
$mail = t3lib_div::makeInstance('MyOwnCustomMailMessageObject'); | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MyOwnCustomMailMessageObject extends t3lib_mail_Message { | |
private function initializeMailer() { | |
$this->mailer = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Mail\\Mailer'); | |
$this->mailer->registerPlugin( | |
t3lib_div::makeInstance('Swift_Plugins_AntiFloodPlugin', 100, 30), 'anti-flood' | |
); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment