Last active
August 26, 2015 11:47
-
-
Save koernchen02/01cfb7eb1eb5ce0fc4c9 to your computer and use it in GitHub Desktop.
Creating a CommandController to be used with TYPO3 Scheduler Extension, based on https://wiki.typo3.org/CommandController_In_Scheduler_Task
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
| /** located in ...ext/flappl/Classes/Command | |
| <?php | |
| namespace Portachtzig\Flappl\Command; | |
| class DeleteCommandController extends \TYPO3\CMS\Extbase\Mvc\Controller\CommandController { | |
| /** | |
| * @var \TYPO3\CMS\Extbase\Domain\Repository\FrontendUserRepository | |
| * @inject | |
| */ | |
| protected $frontendUserRepository = NULL; | |
| /** | |
| * The settings. | |
| * @var array | |
| */ | |
| protected $settings = array(); | |
| /** | |
| * @return bool | |
| */ | |
| // very nice: parameters will be fields in the scheduler! | |
| public function deleteCommand() { | |
| $configurationManager = $this->objectManager->get( '\TYPO3\CMS\Extbase\Configuration\ConfigurationManager' ); | |
| /* @var $configurationManager \TYPO3\CMS\Extbase\Configuration\ConfigurationManager */ | |
| $this->settings = array_merge( $this->settings, $configurationManager->getConfiguration( \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, 'flappl', 'application') ); | |
| return TRUE; | |
| } | |
| } | |
| ?> |
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 | |
| // ... | |
| $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = 'Portachtzig\\Flappl\\Command\\DeleteCommandController'; | |
| // ... |
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
| ... | |
| module.tx_flappl < plugin.tx_flappl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment