TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
ActionList.php
Go to the documentation of this file.
1 <?php
2 namespace TYPO3\CMS\SysAction;
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
20 class ActionList extends \TYPO3\CMS\Recordlist\RecordList\DatabaseRecordList
21 {
32  public function listURL($alternativeId = '', $table = '-1', $excludeList = '')
33  {
34  $urlParameters = [];
35  if ((string)$alternativeId !== '') {
36  $urlParameters['id'] = $alternativeId;
37  } else {
38  $urlParameters['id'] = $this->id;
39  }
40  if ($table === '-1') {
41  $urlParameters['table'] = $this->table;
42  } else {
43  $urlParameters['table'] = $table;
44  }
45  if ($this->thumbs) {
46  $urlParameters['imagemode'] = $this->thumbs;
47  }
48  if ($this->returnUrl) {
49  $urlParameters['returnUrl'] = $this->returnUrl;
50  }
51  if ($this->searchString) {
52  $urlParameters['search_field'] = $this->searchString;
53  }
54  if ($this->searchLevels) {
55  $urlParameters['search_levels'] = $this->searchLevels;
56  }
57  if ($this->showLimit) {
58  $urlParameters['showLimit'] = $this->showLimit;
59  }
60  if ($this->firstElementNumber) {
61  $urlParameters['pointer'] = $this->firstElementNumber;
62  }
63  if ((!$excludeList || !\TYPO3\CMS\Core\Utility\GeneralUtility::inList($excludeList, 'sortField')) && $this->sortField) {
64  $urlParameters['sortField'] = $this->sortField;
65  }
66  if ((!$excludeList || !\TYPO3\CMS\Core\Utility\GeneralUtility::inList($excludeList, 'sortRev')) && $this->sortRev) {
67  $urlParameters['sortRev'] = $this->sortRev;
68  }
69  if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('SET')) {
70  $urlParameters['SET'] = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('SET');
71  }
72  if (\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('show')) {
73  $urlParameters['show'] = (int)\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('show');
74  }
75  return \TYPO3\CMS\Backend\Utility\BackendUtility::getModuleUrl('user_task', $urlParameters);
76  }
77 }
listURL($alternativeId= '', $table= '-1', $excludeList= '')
Definition: ActionList.php:32