[BUGFIX] Fix wrong type hint for emitAfterExtensionT3DImportSignal()
[Packages/TYPO3.CMS.git] / typo3 / db_new.php
1 <?php
2 /**
3 * This file is part of the TYPO3 CMS project.
4 *
5 * It is free software; you can redistribute it and/or modify it under
6 * the terms of the GNU General Public License, either version 2
7 * of the License, or any later version.
8 *
9 * For the full copyright and license information, please read the
10 * LICENSE.txt file that was distributed with this source code.
11 *
12 * The TYPO3 project - inspiring people to share!
13 */
14
15 /**
16 * New database item menu
17 *
18 * This script lets users choose a new database element to create.
19 * Includes a wizard mode for visually pointing out the position of new pages
20 *
21 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
22 */
23 require __DIR__ . '/init.php';
24
25 /**
26 * Extension for the tree class that generates the tree of pages in the page-wizard mode
27 *
28 * @author Kasper Skårhøj <kasperYYYY@typo3.com>
29 */
30 class newRecordLocalPageTree extends \TYPO3\CMS\Backend\Tree\View\PageTreeView {
31
32 /**
33 * Inserting uid-information in title-text for an icon
34 *
35 * @param string $icon Icon image
36 * @param array $row Item row
37 * @return string Wrapping icon image.
38 * @todo Define visibility
39 */
40 public function wrapIcon($icon, $row) {
41 return $this->addTagAttributes($icon, ' title="id=' . htmlspecialchars($row['uid']) . '"');
42 }
43
44 /**
45 * Determines whether to expand a branch or not.
46 * Here the branch is expanded if the current id matches the global id for the listing/new
47 *
48 * @param integer $id The ID (page id) of the element
49 * @return boolean Returns TRUE if the IDs matches
50 * @todo Define visibility
51 */
52 public function expandNext($id) {
53 return $id == $GLOBALS['SOBE']->id ? 1 : 0;
54 }
55 }
56
57 $newRecordController = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\NewRecordController');
58 $newRecordController->main();
59 $newRecordController->printContent();