Created
June 30, 2014 08:01
-
-
Save revsbech/8a9f11b970796017ed54 to your computer and use it in GitHub Desktop.
Various Neos plugin snippets
This file contains 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
/* | |
Accessing the current node or page (documentNde) | |
*/ | |
/** @var \TYPO3\TYPO3CR\Domain\Model\Node $currentNode */ | |
$currentNode = $request->getInternalArgument('__node'); | |
/** @var \TYPO3\TYPO3CR\Domain\Model\Node $currentNode */ | |
$currentPage = $request->getInternalArgument('__documentNode'); | |
/* | |
Accessing general properties from TypoScript: | |
prototype(My.Package:MyPlugin) < prototype(TYPO3.Neos:Plugin) | |
prototype(My.Package:MyPlugin) { | |
package = 'My.Package' | |
controller = 'MyController' | |
action = 'index' | |
site = ${q(site)} | |
} | |
*/ | |
/** @var \TYPO3\Eel\FlowQuery\FlowQuery $siteNode */ | |
$siteNode = $request->getInternalArgument('__site'); | |
/** @var \TYPO3\TYPO3CR\Domain\Model\Node $dailyReportsNode */ | |
$dailyReportsNode = current($siteNode->children('daily-reports')->get()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment