Skip to content

Instantly share code, notes, and snippets.

@aertmann
Created December 29, 2011 14:51
Show Gist options
  • Save aertmann/1534417 to your computer and use it in GitHub Desktop.
Save aertmann/1534417 to your computer and use it in GitHub Desktop.
TYPO3 Phoenix module
<?php
namespace TYPO3\Module\Controller;
/* *
* This script belongs to the FLOW3 package "TYPO3". *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU General Public License, either version 3 of the *
* License, or (at your option) any later version. *
* *
* The TYPO3 project - inspiring people to share! *
* */
use TYPO3\FLOW3\Annotations as FLOW3;
/**
* The TYPO3 Backend controller
*
* @FLOW3\Scope("singleton")
*/
class NewsletterController extends \TYPO3\FLOW3\MVC\Controller\ActionController {
/**
* @var array
*/
protected $moduleConfig;
/**
* @return void
*/
public function initializeAction() {
$this->moduleConfig = $this->request->getInternalArgument('__moduleConfig');
}
/**
* @return void
*/
public function indexAction() {
$this->view->assign('moduleConfig', $this->moduleConfig);
}
}
?>
# #
# Settings #
# #
# This file contains settings for various parts of the application. #
# Just add your own modifications as necessary. #
# #
# Please refer to the default settings file(s) or the manuals for #
# possible configuration options. #
# #
TYPO3:
TYPO3:
modules:
management:
submodules:
newsletter:
label: 'Newsletter Management'
controller: '\TYPO3\Module\Controller\NewsletterController'
submodules:
recipients:
label: 'Recipients'
# controller: '\TYPO3\Module\Controller\RecipientsController'
statistics:
label: 'Statistics'
# controller: '\TYPO3\Module\Controller\StatisticsController'
<h2>{moduleConfig.label}</h2>
<f:if condition="{moduleConfig.submodules}">
<ul>
<f:for each="{moduleConfig.submodules}" key="submoduleIdentifier" as="submoduleConfiguration">
<li>
<f:link.action arguments="{module: '{moduleConfig.path}/{submoduleIdentifier}'}">{submoduleConfiguration.label}</f:link.action>
</li>
</f:for>
</ul>
</f:if>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment