193a2b6565d4cadef9e98d465c668e9f0a6051bb
[Packages/TYPO3.CMS.git] / typo3 / sysext / sys_note / Classes / Hook / PageHook.php
1 <?php
2 namespace TYPO3\CMS\SysNote\Hook;
3
4 /***************************************************************
5 * Copyright notice
6 *
7 * (c) 2012-2013 Georg Ringer <typo3@ringerge.org>
8 * All rights reserved
9 *
10 * This script is part of the TYPO3 project. The TYPO3 project is
11 * free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
15 *
16 * The GNU General Public License can be found at
17 * http://www.gnu.org/copyleft/gpl.html.
18 *
19 * This script is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * This copyright notice MUST APPEAR in all copies of the script!
25 ***************************************************************/
26
27 /**
28 * Hook for the page module
29 *
30 * @author Georg Ringer <typo3@ringerge.org>
31 * @author Kai Vogel <kai.vogel@speedprogs.de>
32 */
33 class PageHook {
34
35 /**
36 * Add sys_notes as additional content to the footer of the page module
37 *
38 * @param array $params
39 * @param \TYPO3\CMS\Backend\Controller\PageLayoutController $parentObject
40 * @return string
41 */
42 public function render(array $params = array(), \TYPO3\CMS\Backend\Controller\PageLayoutController $parentObject) {
43 /** @var $noteBootstrap \TYPO3\CMS\SysNote\Core\Bootstrap */
44 $noteBootstrap = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\SysNote\\Core\\Bootstrap');
45 return $noteBootstrap->run('Note', 'list', array('pids' => $parentObject->id));
46 }
47
48 }