TYPO3 CMS  TYPO3_6-2
DefaultFactory.php
Go to the documentation of this file.
1 <?php
3 
21 
29  public function getStructure() {
30  $rootNode = new RootNode($this->getDefaultStructureDefinition(), NULL);
31  if (!($rootNode instanceof RootNodeInterface)) {
32  throw new Exception(
33  'Root node must implement RootNodeInterface',
34  1366139176
35  );
36  }
37  $structureFacade = new StructureFacade($rootNode);
38  if (!($structureFacade instanceof StructureFacadeInterface)) {
39  throw new Exception(
40  'Structure facade must implement StructureFacadeInterface',
41  1366535827
42  );
43  }
44  return $structureFacade;
45  }
46 
53  protected function getDefaultStructureDefinition() {
54  $filePermission = $GLOBALS['TYPO3_CONF_VARS']['BE']['fileCreateMask'];
55  $directoryPermission = $GLOBALS['TYPO3_CONF_VARS']['BE']['folderCreateMask'];
56 
57  return array(
58  // Cut off trailing forward / from PATH_site, so root node has no trailing slash like all others
59  'name' => substr(PATH_site, 0, -1),
60  'targetPermission' => $directoryPermission,
61  'children' => array(
62  array(
63  'name' => 'index.php',
64  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\LinkNode',
65  'target' => 'typo3_src/index.php',
66  ),
67  array(
68  'name' => 'typo3',
69  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\LinkNode',
70  'target' => 'typo3_src/typo3',
71  ),
72  array(
73  'name' => 'typo3_src',
74  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\LinkNode',
75  ),
76  array(
77  'name' => 'typo3temp',
78  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
79  'targetPermission' => $directoryPermission,
80  'children' => array(
81  array(
82  'name' => 'index.html',
83  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\FileNode',
84  'targetPermission' => $filePermission,
85  'targetContent' => '',
86  ),
87  array(
88  'name' => 'compressor',
89  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
90  'targetPermission' => $directoryPermission,
91  ),
92  array(
93  'name' => 'cs',
94  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
95  'targetPermission' => $directoryPermission,
96  ),
97  array(
98  'name' => 'Cache',
99  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
100  'targetPermission' => $directoryPermission,
101  ),
102  array(
103  'name' => 'GB',
104  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
105  'targetPermission' => $directoryPermission,
106  ),
107  array(
108  'name' => 'llxml',
109  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
110  'targetPermission' => $directoryPermission,
111  ),
112  array(
113  'name' => 'locks',
114  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
115  'targetPermission' => $directoryPermission,
116  ),
117  array(
118  'name' => 'pics',
119  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
120  'targetPermission' => $directoryPermission,
121  ),
122  array(
123  'name' => 'sprites',
124  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
125  'targetPermission' => $directoryPermission,
126  ),
127  array(
128  'name' => 'temp',
129  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
130  'targetPermission' => $directoryPermission,
131  ),
132  array(
133  'name' => '_processed_',
134  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
135  'targetPermission' => $directoryPermission,
136  ),
137  ),
138  ),
139  array(
140  'name' => 'typo3conf',
141  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
142  'targetPermission' => $directoryPermission,
143  'children' => array(
144  array(
145  'name' => 'ext',
146  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
147  'targetPermission' => $directoryPermission,
148  ),
149  array(
150  'name' => 'l10n',
151  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
152  'targetPermission' => $directoryPermission,
153  ),
154  ),
155  ),
156  array(
157  'name' => 'uploads',
158  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
159  'targetPermission' => $directoryPermission,
160  'children' => array(
161  array(
162  'name' => 'index.html',
163  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\FileNode',
164  'targetPermission' => $filePermission,
165  'targetContentFile' => PATH_site . 'typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/uploads-index.html',
166  ),
167  array(
168  'name' => 'media',
169  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
170  'targetPermission' => $directoryPermission,
171  'children' => array(
172  array(
173  'name' => 'index.html',
174  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\FileNode',
175  'targetPermission' => $filePermission,
176  'targetContent' => '',
177  ),
178  ),
179  ),
180  array(
181  'name' => 'pics',
182  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
183  'targetPermission' => $directoryPermission,
184  'children' => array(
185  array(
186  'name' => 'index.html',
187  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\FileNode',
188  'targetPermission' => $filePermission,
189  'targetContent' => '',
190  ),
191  ),
192  ),
193  array(
194  'name' => 'tx_felogin',
195  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
196  'targetPermission' => $directoryPermission,
197  ),
198  ),
199  ),
200  array(
201  'name' => !empty($GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir']) ? rtrim($GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'], '/') : 'fileadmin',
202  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
203  'targetPermission' => $directoryPermission,
204  'children' => array(
205  array(
206  'name' => '_temp_',
207  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
208  'targetPermission' => $directoryPermission,
209  'children' => array(
210  array(
211  'name' => '.htaccess',
212  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\FileNode',
213  'targetPermission' => $filePermission,
214  'targetContentFile' => PATH_site . 'typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/fileadmin-temp-htaccess',
215  ),
216  array(
217  'name' => 'index.html',
218  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\FileNode',
219  'targetPermission' => $filePermission,
220  'targetContentFile' => PATH_site . 'typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/fileadmin-temp-index.html',
221  ),
222  ),
223  ),
224  array(
225  'name' => 'user_upload',
226  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
227  'targetPermission' => $directoryPermission,
228  'children' => array(
229  array(
230  'name' => '_temp_',
231  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
232  'targetPermission' => $directoryPermission,
233  'children' => array(
234  array(
235  'name' => 'index.html',
236  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\FileNode',
237  'targetPermission' => $filePermission,
238  'targetContent' => '',
239  ),
240  array(
241  'name' => 'importexport',
242  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\DirectoryNode',
243  'targetPermission' => $directoryPermission,
244  'children' => array(
245  array(
246  'name' => '.htaccess',
247  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\FileNode',
248  'targetPermission' => $filePermission,
249  'targetContentFile' => PATH_site . 'typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/fileadmin-user_upload-temp-importexport-htaccess',
250  ),
251  array(
252  'name' => 'index.html',
253  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\FileNode',
254  'targetPermission' => $filePermission,
255  'targetContentFile' => PATH_site . 'typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/fileadmin-temp-index.html',
256  ),
257  ),
258  ),
259  ),
260  ),
261  array(
262  'name' => 'index.html',
263  'type' => 'TYPO3\\CMS\\install\\FolderStructure\\FileNode',
264  'targetPermission' => $filePermission,
265  'targetContent' => '',
266  ),
267  ),
268  ),
269  ),
270  ),
271  ),
272  );
273  }
274 }
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]