~slub.team/goobi-presentation/old-bzr-trunk

« back to all changes in this revision

Viewing changes to dlf/plugins/toc/class.tx_dlf_toc.php

  • Committer: Sebastian Meyer
  • Date: 2012-08-17 07:02:36 UTC
  • mfrom: (82.1.54 Goobi.Presentation 1.1)
  • Revision ID: sebastian.meyer@slub-dresden.de-20120817070236-d6gh9s8l47q9k5j8
Merge changes from Goobi.Presentation CE 1.1.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
 
117
117
                                $entryArray['_SUB_MENU'] = array ();
118
118
 
119
 
                                foreach ($entry['children'] as $_child) {
 
119
                                foreach ($entry['children'] as $child) {
120
120
 
121
121
                                        // Set "ITEM_STATE" to "ACT" if this entry points to current page and has sub-entries pointing to the same page.
122
 
                                        if (in_array($_child['id'], $this->activeEntries)) {
 
122
                                        if (in_array($child['id'], $this->activeEntries)) {
123
123
 
124
124
                                                $entryArray['ITEM_STATE'] = 'ACT';
125
125
 
126
126
                                        }
127
127
 
128
 
                                        $entryArray['_SUB_MENU'][] = $this->getMenuEntry($_child, TRUE);
 
128
                                        $entryArray['_SUB_MENU'][] = $this->getMenuEntry($child, TRUE);
129
129
 
130
130
                                }
131
131
 
157
157
                // Check for typoscript configuration to prevent fatal error.
158
158
                if (empty($this->conf['menuConf.'])) {
159
159
 
160
 
                        trigger_error('No typoscript configuration for table of contents available', E_USER_NOTICE);
 
160
                        if (TYPO3_DLOG) {
 
161
 
 
162
                                t3lib_div::devLog('[tx_dlf_toc->main('.$content.', [data])] Incomplete plugin configuration', $this->extKey, SYSLOG_SEVERITY_WARNING, $conf);
 
163
 
 
164
                        }
161
165
 
162
166
                        return $content;
163
167
 
174
178
 
175
179
                }
176
180
 
177
 
                $_TSconfig = array ();
178
 
 
179
 
                $_TSconfig['special'] = 'userfunction';
180
 
 
181
 
                $_TSconfig['special.']['userFunc'] = 'tx_dlf_toc->makeMenuArray';
182
 
 
183
 
                $_TSconfig = t3lib_div::array_merge_recursive_overrule($this->conf['menuConf.'], $_TSconfig);
184
 
 
185
 
                $markerArray['###TOCMENU###'] = $this->cObj->HMENU($_TSconfig);
 
181
                $TSconfig = array ();
 
182
 
 
183
                $TSconfig['special'] = 'userfunction';
 
184
 
 
185
                $TSconfig['special.']['userFunc'] = 'tx_dlf_toc->makeMenuArray';
 
186
 
 
187
                $TSconfig = t3lib_div::array_merge_recursive_overrule($this->conf['menuConf.'], $TSconfig);
 
188
 
 
189
                $markerArray['###TOCMENU###'] = $this->cObj->HMENU($TSconfig);
186
190
 
187
191
                $content .= $this->cObj->substituteMarkerArray($this->template, $markerArray);
188
192
 
230
234
                        }
231
235
 
232
236
                        // Go through table of contents and create all menu entries.
233
 
                        foreach ($this->doc->tableOfContents as $_entry) {
 
237
                        foreach ($this->doc->tableOfContents as $entry) {
234
238
 
235
 
                                $menuArray[] = $this->getMenuEntry($_entry, TRUE);
 
239
                                $menuArray[] = $this->getMenuEntry($entry, TRUE);
236
240
 
237
241
                        }
238
242
 
239
243
                } else {
240
244
 
241
245
                        // Go through table of contents and create top-level menu entries.
242
 
                        foreach ($this->doc->tableOfContents as $_entry) {
 
246
                        foreach ($this->doc->tableOfContents as $entry) {
243
247
 
244
 
                                $menuArray[] = $this->getMenuEntry($_entry, FALSE);
 
248
                                $menuArray[] = $this->getMenuEntry($entry, FALSE);
245
249
 
246
250
                        }
247
251
 
272
276
 
273
277
                                while ($resArray = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
274
278
 
275
 
                                        $_entry = array (
 
279
                                        $entry = array (
276
280
                                                'label' => $resArray['title'],
277
281
                                                'type' => $resArray['type'],
278
282
                                                'volume' => $resArray['volume'],
280
284
                                                'targetUid' => $resArray['uid']
281
285
                                        );
282
286
 
283
 
                                        $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($_entry, FALSE);
 
287
                                        $menuArray[0]['_SUB_MENU'][] = $this->getMenuEntry($entry, FALSE);
284
288
 
285
289
                                }
286
290