‪TYPO3CMS  10.4
QueryView.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
18 use Doctrine\DBAL\DBALException;
36 
42 {
46  public ‪$storeList = 'search_query_smallparts,search_result_labels,labels_noprefix,show_deleted,queryConfig,queryTable,queryFields,queryLimit,queryOrder,queryOrderDesc,queryOrder2,queryOrder2Desc,queryGroup,search_query_makeQuery';
47 
51  public ‪$noDownloadB = 0;
52 
56  public ‪$hookArray = [];
57 
61  protected ‪$formName = '';
62 
66  protected ‪$iconFactory;
67 
71  protected ‪$tableArray = [];
72 
76  protected ‪$languageService;
77 
82 
87  protected ‪$settings = [];
88 
92  protected ‪$menuItems = [];
93 
97  protected ‪$moduleName;
98 
104  public function ‪__construct(array ‪$settings = null, ‪$menuItems = null, ‪$moduleName = null)
105  {
106  $this->backendUserAuthentication = ‪$GLOBALS['BE_USER'];
107  $this->languageService = ‪$GLOBALS['LANG'];
108  $this->languageService->includeLLFile('EXT:core/Resources/Private/Language/locallang_t3lib_fullsearch.xlf');
109  $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
110  $this->settings = ‪$settings ?: ‪$GLOBALS['SOBE']->MOD_SETTINGS;
111  $this->menuItems = ‪$menuItems ?: ‪$GLOBALS['SOBE']->MOD_MENU;
112  $this->moduleName = ‪$moduleName ?: ‪$GLOBALS['SOBE']->moduleName;
113  }
114 
120  public function ‪form()
121  {
122  $markup = [];
123  $markup[] = '<div class="form-group">';
124  $markup[] = '<input placeholder="Search Word" class="form-control" type="search" name="SET[sword]" value="'
125  . htmlspecialchars($this->settings['sword']) . '">';
126  $markup[] = '</div>';
127  $markup[] = '<div class="form-group">';
128  $markup[] = '<input class="btn btn-default" type="submit" name="submit" value="Search All Records">';
129  $markup[] = '</div>';
130  return implode(LF, $markup);
131  }
132 
138  public function ‪makeStoreControl()
139  {
140  // Load/Save
141  $storeArray = $this->‪initStoreArray();
142 
143  $opt = [];
144  foreach ($storeArray as $k => $v) {
145  $opt[] = '<option value="' . htmlspecialchars($k) . '">' . htmlspecialchars($v) . '</option>';
146  }
147  // Actions:
148  if (‪ExtensionManagementUtility::isLoaded('sys_action') && $this->backendUserAuthentication->isAdmin()) {
149  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('sys_action');
150  $queryBuilder->getRestrictions()->removeAll();
151  $statement = $queryBuilder->select('uid', 'title')
152  ->from('sys_action')
153  ->where($queryBuilder->expr()->eq('type', $queryBuilder->createNamedParameter(2, \PDO::PARAM_INT)))
154  ->orderBy('title')
155  ->execute();
156  $opt[] = '<option value="0">__Save to Action:__</option>';
157  while ($row = $statement->fetch()) {
158  $opt[] = '<option value="-' . (int)$row['uid'] . '">' . htmlspecialchars($row['title']
159  . ' [' . (int)$row['uid'] . ']') . '</option>';
160  }
161  }
162  $markup = [];
163  $markup[] = '<div class="load-queries">';
164  $markup[] = ' <div class="form-group form-inline">';
165  $markup[] = ' <div class="form-group">';
166  $markup[] = ' <select class="form-control" name="storeControl[STORE]" data-assign-store-control-title>' . implode(LF, $opt) . '</select>';
167  $markup[] = ' <input class="form-control" name="storeControl[title]" value="" type="text" max="80">';
168  $markup[] = ' <input class="btn btn-default" type="submit" name="storeControl[LOAD]" value="Load">';
169  $markup[] = ' <input class="btn btn-default" type="submit" name="storeControl[SAVE]" value="Save">';
170  $markup[] = ' <input class="btn btn-default" type="submit" name="storeControl[REMOVE]" value="Remove">';
171  $markup[] = ' </div>';
172  $markup[] = ' </div>';
173  $markup[] = '</div>';
174 
175  return implode(LF, $markup);
176  }
177 
183  public function ‪initStoreArray()
184  {
185  $storeArray = [
186  '0' => '[New]'
187  ];
188  $savedStoreArray = unserialize($this->settings['storeArray'], ['allowed_classes' => false]);
189  if (is_array($savedStoreArray)) {
190  $storeArray = array_merge($storeArray, $savedStoreArray);
191  }
192  return $storeArray;
193  }
194 
202  public function ‪cleanStoreQueryConfigs($storeQueryConfigs, $storeArray)
203  {
204  if (is_array($storeQueryConfigs)) {
205  foreach ($storeQueryConfigs as $k => $v) {
206  if (!isset($storeArray[$k])) {
207  unset($storeQueryConfigs[$k]);
208  }
209  }
210  }
211  return $storeQueryConfigs;
212  }
213 
221  public function ‪addToStoreQueryConfigs($storeQueryConfigs, $index)
222  {
223  $keyArr = explode(',', $this->storeList);
224  $storeQueryConfigs[$index] = [];
225  foreach ($keyArr as $k) {
226  $storeQueryConfigs[$index][$k] = $this->settings[$k];
227  }
228  return $storeQueryConfigs;
229  }
230 
237  public function ‪saveQueryInAction($uid)
238  {
239  if (‪ExtensionManagementUtility::isLoaded('sys_action')) {
240  $keyArr = explode(',', $this->storeList);
241  $saveArr = [];
242  foreach ($keyArr as $k) {
243  $saveArr[$k] = $this->settings[$k];
244  }
245  // Show query
246  if ($saveArr['queryTable']) {
248  $queryGenerator = GeneralUtility::makeInstance(QueryGenerator::class);
249  $queryGenerator->init('queryConfig', $saveArr['queryTable'], '', $this->settings);
250  $queryGenerator->makeSelectorTable($saveArr);
251  $queryGenerator->enablePrefix = 1;
252  $queryString = $queryGenerator->getQuery($queryGenerator->queryConfig);
253 
254  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
255  ->getQueryBuilderForTable($queryGenerator->table);
256  $queryBuilder->getRestrictions()->removeAll()
257  ->add(GeneralUtility::makeInstance(DeletedRestriction::class));
258  $rowCount = $queryBuilder->count('*')
259  ->from($queryGenerator->table)
260  ->where(‪QueryHelper::stripLogicalOperatorPrefix($queryString))
261  ->execute()->fetchColumn(0);
262 
263  $t2DataValue = [
264  'qC' => $saveArr,
265  'qCount' => $rowCount,
266  'qSelect' => $queryGenerator->getSelectQuery($queryString),
267  'qString' => $queryString
268  ];
269  GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('sys_action')
270  ->update(
271  'sys_action',
272  ['t2_data' => serialize($t2DataValue)],
273  ['uid' => (int)$uid],
274  ['t2_data' => ‪Connection::PARAM_LOB]
275  );
276  }
277  return 1;
278  }
279  return null;
280  }
281 
290  public function ‪loadStoreQueryConfigs($storeQueryConfigs, $storeIndex, $writeArray)
291  {
292  if ($storeQueryConfigs[$storeIndex]) {
293  $keyArr = explode(',', $this->storeList);
294  foreach ($keyArr as $k) {
295  $writeArray[$k] = $storeQueryConfigs[$storeIndex][$k];
296  }
297  }
298  return $writeArray;
299  }
300 
306  public function ‪procesStoreControl()
307  {
308  $flashMessage = null;
309  $storeArray = $this->‪initStoreArray();
310  $storeQueryConfigs = unserialize($this->settings['storeQueryConfigs'], ['allowed_classes' => false]);
311  $storeControl = GeneralUtility::_GP('storeControl');
312  $storeIndex = (int)$storeControl['STORE'];
313  $saveStoreArray = 0;
314  $writeArray = [];
315  $msg = '';
316  if (is_array($storeControl)) {
317  if ($storeControl['LOAD']) {
318  if ($storeIndex > 0) {
319  $writeArray = $this->‪loadStoreQueryConfigs($storeQueryConfigs, $storeIndex, $writeArray);
320  $saveStoreArray = 1;
321  $flashMessage = GeneralUtility::makeInstance(
322  FlashMessage::class,
323  sprintf($this->languageService->getLL('query_loaded'), $storeArray[$storeIndex])
324  );
325  } elseif ($storeIndex < 0 && ‪ExtensionManagementUtility::isLoaded('sys_action')) {
326  $actionRecord = ‪BackendUtility::getRecord('sys_action', abs($storeIndex));
327  if (is_array($actionRecord)) {
328  $dA = unserialize($actionRecord['t2_data'], ['allowed_classes' => false]);
329  $dbSC = [];
330  if (is_array($dA['qC'])) {
331  $dbSC[0] = $dA['qC'];
332  }
333  $writeArray = $this->‪loadStoreQueryConfigs($dbSC, '0', $writeArray);
334  $saveStoreArray = 1;
335  $flashMessage = GeneralUtility::makeInstance(
336  FlashMessage::class,
337  sprintf($this->languageService->getLL('query_from_action_loaded'), $actionRecord['title'])
338  );
339  }
340  }
341  } elseif ($storeControl['SAVE']) {
342  if ($storeIndex < 0) {
343  $qOK = $this->‪saveQueryInAction(abs($storeIndex));
344  if ($qOK) {
345  $flashMessage = GeneralUtility::makeInstance(
346  FlashMessage::class,
347  $this->languageService->getLL('query_saved')
348  );
349  } else {
350  $flashMessage = GeneralUtility::makeInstance(
351  FlashMessage::class,
352  $this->languageService->getLL('query_notsaved'),
353  '',
355  );
356  }
357  } else {
358  if (trim($storeControl['title'])) {
359  if ($storeIndex > 0) {
360  $storeArray[$storeIndex] = $storeControl['title'];
361  } else {
362  $storeArray[] = $storeControl['title'];
363  end($storeArray);
364  $storeIndex = key($storeArray);
365  }
366  $storeQueryConfigs = $this->‪addToStoreQueryConfigs($storeQueryConfigs, $storeIndex);
367  $saveStoreArray = 1;
368  $flashMessage = GeneralUtility::makeInstance(
369  FlashMessage::class,
370  $this->languageService->getLL('query_saved')
371  );
372  }
373  }
374  } elseif ($storeControl['REMOVE']) {
375  if ($storeIndex > 0) {
376  $flashMessage = GeneralUtility::makeInstance(
377  FlashMessage::class,
378  sprintf($this->languageService->getLL('query_removed'), $storeArray[$storeControl['STORE']])
379  );
380  // Removing
381  unset($storeArray[$storeControl['STORE']]);
382  $saveStoreArray = 1;
383  }
384  }
385  if (!empty($flashMessage)) {
386  $msg = GeneralUtility::makeInstance(FlashMessageRendererResolver::class)
387  ->resolve()
388  ->render([$flashMessage]);
389  }
390  }
391  if ($saveStoreArray) {
392  // Making sure, index 0 is not set!
393  unset($storeArray[0]);
394  $writeArray['storeArray'] = serialize($storeArray);
395  $writeArray['storeQueryConfigs'] =
396  serialize($this->‪cleanStoreQueryConfigs($storeQueryConfigs, $storeArray));
397  $this->settings = ‪BackendUtility::getModuleData(
398  $this->menuItems,
399  $writeArray,
400  $this->moduleName,
401  'ses'
402  );
403  }
404  return $msg;
405  }
406 
412  public function ‪queryMaker()
413  {
414  ‪$output = '';
415  $this->hookArray = ‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['t3lib_fullsearch'] ?? [];
416  $msg = $this->‪procesStoreControl();
417  $userTsConfig = $this->backendUserAuthentication->getTSConfig();
418  if (!$userTsConfig['mod.']['dbint.']['disableStoreControl']) {
419  ‪$output .= '<h2>Load/Save Query</h2>';
420  ‪$output .= '<div>' . $this->‪makeStoreControl() . '</div>';
421  ‪$output .= $msg;
422  }
423  // Query Maker:
424  $queryGenerator = GeneralUtility::makeInstance(QueryGenerator::class);
425  $queryGenerator->init('queryConfig', $this->settings['queryTable'], '', $this->settings);
426  if ($this->formName) {
427  $queryGenerator->setFormName($this->formName);
428  }
429  $tmpCode = $queryGenerator->makeSelectorTable($this->settings);
430  ‪$output .= '<div id="query"></div><h2>Make query</h2><div>' . $tmpCode . '</div>';
431  $mQ = $this->settings['search_query_makeQuery'];
432  // Make form elements:
433  if ($queryGenerator->table && is_array(‪$GLOBALS['TCA'][$queryGenerator->table])) {
434  if ($mQ) {
435  // Show query
436  $queryGenerator->enablePrefix = 1;
437  $queryString = $queryGenerator->getQuery($queryGenerator->queryConfig);
438  $selectQueryString = $queryGenerator->getSelectQuery($queryString);
439  $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($queryGenerator->table);
440 
441  $isConnectionMysql = strpos($connection->getServerVersion(), 'MySQL') === 0;
442  $fullQueryString = '';
443  try {
444  if ($mQ === 'explain' && $isConnectionMysql) {
445  // EXPLAIN is no ANSI SQL, for now this is only executed on mysql
446  // @todo: Move away from getSelectQuery() or model differently
447  $fullQueryString = 'EXPLAIN ' . $selectQueryString;
448  $dataRows = $connection->executeQuery('EXPLAIN ' . $selectQueryString)->fetchAll();
449  } elseif ($mQ === 'count') {
450  $queryBuilder = $connection->createQueryBuilder();
451  $queryBuilder->getRestrictions()->removeAll();
452  if (empty($this->settings['show_deleted'])) {
453  $queryBuilder->getRestrictions()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
454  }
455  $queryBuilder->count('*')
456  ->from($queryGenerator->table)
457  ->where(‪QueryHelper::stripLogicalOperatorPrefix($queryString));
458  $fullQueryString = $queryBuilder->getSQL();
459  $dataRows = [$queryBuilder->execute()->fetchColumn(0)];
460  } else {
461  $fullQueryString = $selectQueryString;
462  $dataRows = $connection->executeQuery($selectQueryString)->fetchAll();
463  }
464  if (!$userTsConfig['mod.']['dbint.']['disableShowSQLQuery']) {
465  ‪$output .= '<h2>SQL query</h2><div><pre>' . htmlspecialchars($fullQueryString) . '</pre></div>';
466  }
467  $cPR = $this->‪getQueryResultCode($mQ, $dataRows, $queryGenerator->table);
468  ‪$output .= '<h2>' . $cPR['header'] . '</h2><div>' . $cPR['content'] . '</div>';
469  } catch (DBALException $e) {
470  if (!$userTsConfig['mod.']['dbint.']['disableShowSQLQuery']) {
471  ‪$output .= '<h2>SQL query</h2><div><pre>' . htmlspecialchars($fullQueryString) . '</pre></div>';
472  }
473  $out = '<p><strong>Error: <span class="text-danger">'
474  . htmlspecialchars($e->getMessage())
475  . '</span></strong></p>';
476  ‪$output .= '<h2>SQL error</h2><div>' . $out . '</div>';
477  }
478  }
479  }
480  return '<div class="database-query-builder">' . ‪$output . '</div>';
481  }
482 
492  public function ‪getQueryResultCode($type, array $dataRows, $table)
493  {
494  $out = '';
495  $cPR = [];
496  switch ($type) {
497  case 'count':
498  $cPR['header'] = 'Count';
499  $cPR['content'] = '<br><strong>' . (int)$dataRows[0] . '</strong> records selected.';
500  break;
501  case 'all':
502  $rowArr = [];
503  $dataRow = null;
504  foreach ($dataRows as $dataRow) {
505  $rowArr[] = $this->‪resultRowDisplay($dataRow, ‪$GLOBALS['TCA'][$table], $table);
506  }
507  if (is_array($this->hookArray['beforeResultTable'])) {
508  foreach ($this->hookArray['beforeResultTable'] as $_funcRef) {
509  $out .= GeneralUtility::callUserFunction($_funcRef, $this->settings, $this);
510  }
511  }
512  if (!empty($rowArr)) {
513  $cPR['header'] = 'Result';
514  $out .= '<table class="table table-striped table-hover">'
515  . $this->‪resultRowTitles($dataRow, ‪$GLOBALS['TCA'][$table]) . implode(LF, $rowArr)
516  . '</table>';
517  } else {
519  }
520 
521  $cPR['content'] = $out;
522  break;
523  case 'csv':
524  $rowArr = [];
525  $first = 1;
526  foreach ($dataRows as $dataRow) {
527  if ($first) {
528  $rowArr[] = $this->‪csvValues(array_keys($dataRow));
529  $first = 0;
530  }
531  $rowArr[] = $this->‪csvValues($dataRow, ',', '"', ‪$GLOBALS['TCA'][$table], $table);
532  }
533  if (!empty($rowArr)) {
534  $cPR['header'] = 'Result';
535  $out .= '<textarea name="whatever" rows="20" class="text-monospace" style="width:100%">'
536  . htmlspecialchars(implode(LF, $rowArr))
537  . '</textarea>';
538  if (!$this->noDownloadB) {
539  $out .= '<br><input class="btn btn-default" type="submit" name="download_file" '
540  . 'value="Click to download file">';
541  }
542  // Downloads file:
543  // @todo: args. routing anyone?
544  if (GeneralUtility::_GP('download_file')) {
545  $filename = 'TYPO3_' . $table . '_export_' . date('dmy-Hi') . '.csv';
546  $mimeType = 'application/octet-stream';
547  header('Content-Type: ' . $mimeType);
548  header('Content-Disposition: attachment; filename=' . $filename);
549  echo implode(CRLF, $rowArr);
550  die;
551  }
552  } else {
554  }
555  $cPR['content'] = $out;
556  break;
557  case 'explain':
558  default:
559  foreach ($dataRows as $dataRow) {
560  $out .= '<br />' . ‪DebugUtility::viewArray($dataRow);
561  }
562  $cPR['header'] = 'Explain SQL query';
563  $cPR['content'] = $out;
564  }
565  return $cPR;
566  }
567 
578  public function ‪csvValues($row, $delim = ',', $quote = '"', $conf = [], $table = '')
579  {
580  $valueArray = $row;
581  if ($this->settings['search_result_labels'] && $table) {
582  foreach ($valueArray as $key => $val) {
583  $valueArray[$key] = $this->‪getProcessedValueExtra($table, $key, $val, $conf, ';');
584  }
585  }
586  return ‪CsvUtility::csvValues($valueArray, $delim, $quote);
587  }
588 
594  public function ‪search()
595  {
596  $swords = $this->settings['sword'];
597  $out = '';
598  if ($swords) {
599  foreach (‪$GLOBALS['TCA'] as $table => $value) {
600  // Get fields list
601  $conf = ‪$GLOBALS['TCA'][$table];
602  // Avoid querying tables with no columns
603  if (empty($conf['columns'])) {
604  continue;
605  }
606  $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($table);
607  $tableColumns = $connection->getSchemaManager()->listTableColumns($table);
608  $fieldsInDatabase = [];
609  foreach ($tableColumns as $column) {
610  $fieldsInDatabase[] = $column->getName();
611  }
612  ‪$fields = array_intersect(array_keys($conf['columns']), $fieldsInDatabase);
613 
614  $queryBuilder = $connection->createQueryBuilder();
615  $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
616  $queryBuilder->count('*')->from($table);
617  $likes = [];
618  $escapedLikeString = '%' . $queryBuilder->escapeLikeWildcards($swords) . '%';
619  foreach (‪$fields as $field) {
620  $likes[] = $queryBuilder->expr()->like(
621  $field,
622  $queryBuilder->createNamedParameter($escapedLikeString, \PDO::PARAM_STR)
623  );
624  }
625  $count = $queryBuilder->orWhere(...$likes)->execute()->fetchColumn(0);
626 
627  if ($count > 0) {
628  $queryBuilder = $connection->createQueryBuilder();
629  $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
630  $queryBuilder->select('uid', $conf['ctrl']['label'])
631  ->from($table)
632  ->setMaxResults(200);
633  $likes = [];
634  foreach (‪$fields as $field) {
635  $likes[] = $queryBuilder->expr()->like(
636  $field,
637  $queryBuilder->createNamedParameter($escapedLikeString, \PDO::PARAM_STR)
638  );
639  }
640  $statement = $queryBuilder->orWhere(...$likes)->execute();
641  $lastRow = null;
642  $rowArr = [];
643  while ($row = $statement->fetch()) {
644  $rowArr[] = $this->‪resultRowDisplay($row, $conf, $table);
645  $lastRow = $row;
646  }
647  $markup = [];
648  $markup[] = '<div class="panel panel-default">';
649  $markup[] = ' <div class="panel-heading">';
650  $markup[] = htmlspecialchars($this->languageService->sL($conf['ctrl']['title'])) . ' (' . $count . ')';
651  $markup[] = ' </div>';
652  $markup[] = ' <table class="table table-striped table-hover">';
653  $markup[] = $this->‪resultRowTitles($lastRow, $conf);
654  $markup[] = implode(LF, $rowArr);
655  $markup[] = ' </table>';
656  $markup[] = '</div>';
657 
658  $out .= implode(LF, $markup);
659  }
660  }
661  }
662  return $out;
663  }
664 
673  public function ‪resultRowDisplay($row, $conf, $table)
674  {
675  $out = '<tr>';
676  foreach ($row as $fieldName => $fieldValue) {
677  if (GeneralUtility::inList($this->settings['queryFields'], $fieldName)
678  || !$this->settings['queryFields']
679  && $fieldName !== 'pid'
680  && $fieldName !== 'deleted'
681  ) {
682  if ($this->settings['search_result_labels']) {
683  $fVnew = $this->‪getProcessedValueExtra($table, $fieldName, $fieldValue, $conf, '<br />');
684  } else {
685  $fVnew = htmlspecialchars($fieldValue);
686  }
687  $out .= '<td>' . $fVnew . '</td>';
688  }
689  }
690  $out .= '<td>';
692  $uriBuilder = GeneralUtility::makeInstance(UriBuilder::class);
693 
694  if (!$row['deleted']) {
695  $out .= '<div class="btn-group" role="group">';
696  $url = (string)$uriBuilder->buildUriFromRoute('record_edit', [
697  'edit' => [
698  $table => [
699  $row['uid'] => 'edit'
700  ]
701  ],
702  'returnUrl' => GeneralUtility::getIndpEnv('REQUEST_URI')
703  . ‪HttpUtility::buildQueryString(['SET' => (array)GeneralUtility::_POST('SET')], '&')
704  ]);
705  $out .= '<a class="btn btn-default" href="' . htmlspecialchars($url) . '">'
706  . $this->iconFactory->getIcon('actions-open', ‪Icon::SIZE_SMALL)->render() . '</a>';
707  $out .= '</div><div class="btn-group" role="group">';
708  $out .= sprintf(
709  '<a class="btn btn-default" href="#" data-dispatch-action="%s" data-dispatch-args-list="%s">%s</a>',
710  'TYPO3.InfoWindow.showItem',
711  htmlspecialchars($table . ',' . $row['uid']),
712  $this->iconFactory->getIcon('actions-document-info', ‪Icon::SIZE_SMALL)->render()
713  );
714  $out .= '</div>';
715  } else {
716  $out .= '<div class="btn-group" role="group">';
717  $out .= '<a class="btn btn-default" href="' . htmlspecialchars((string)$uriBuilder->buildUriFromRoute('tce_db', [
718  'cmd' => [
719  $table => [
720  $row['uid'] => [
721  'undelete' => 1
722  ]
723  ]
724  ],
725  'redirect' => GeneralUtility::linkThisScript()
726  ])) . '" title="' . htmlspecialchars($this->languageService->getLL('undelete_only')) . '">';
727  $out .= $this->iconFactory->getIcon('actions-edit-restore', ‪Icon::SIZE_SMALL)->render() . '</a>';
728  $formEngineParameters = [
729  'edit' => [
730  $table => [
731  $row['uid'] => 'edit'
732  ]
733  ],
734  'returnUrl' => GeneralUtility::linkThisScript()
735  ];
736  $redirectUrl = (string)$uriBuilder->buildUriFromRoute('record_edit', $formEngineParameters);
737  $out .= '<a class="btn btn-default" href="' . htmlspecialchars((string)$uriBuilder->buildUriFromRoute('tce_db', [
738  'cmd' => [
739  $table => [
740  $row['uid'] => [
741  'undelete' => 1
742  ]
743  ]
744  ],
745  'redirect' => $redirectUrl
746  ])) . '" title="' . htmlspecialchars($this->languageService->getLL('undelete_and_edit')) . '">';
747  $out .= $this->iconFactory->getIcon('actions-delete-edit', ‪Icon::SIZE_SMALL)->render() . '</a>';
748  $out .= '</div>';
749  }
750  $_params = [$table => $row];
751  if (is_array($this->hookArray['additionalButtons'])) {
752  foreach ($this->hookArray['additionalButtons'] as $_funcRef) {
753  $out .= GeneralUtility::callUserFunction($_funcRef, $_params, $this);
754  }
755  }
756  $out .= '</td></tr>';
757  return $out;
758  }
759 
770  public function ‪getProcessedValueExtra($table, $fieldName, $fieldValue, $conf, $splitString)
771  {
772  $out = '';
773  ‪$fields = [];
774  // Analysing the fields in the table.
775  if (is_array(‪$GLOBALS['TCA'][$table])) {
776  $fC = ‪$GLOBALS['TCA'][$table]['columns'][$fieldName];
777  ‪$fields = $fC['config'];
778  ‪$fields['exclude'] = $fC['exclude'];
779  if (is_array($fC) && $fC['label']) {
780  ‪$fields['label'] = preg_replace('/:$/', '', trim($this->languageService->sL($fC['label'])));
781  switch (‪$fields['type']) {
782  case 'input':
783  if (preg_match('/int|year/i', ‪$fields['eval'])) {
784  ‪$fields['type'] = 'number';
785  } elseif (preg_match('/time/i', ‪$fields['eval'])) {
786  ‪$fields['type'] = 'time';
787  } elseif (preg_match('/date/i', ‪$fields['eval'])) {
788  ‪$fields['type'] = 'date';
789  } else {
790  ‪$fields['type'] = 'text';
791  }
792  break;
793  case 'check':
794  if (!‪$fields['items']) {
795  ‪$fields['type'] = 'boolean';
796  } else {
797  ‪$fields['type'] = 'binary';
798  }
799  break;
800  case 'radio':
801  ‪$fields['type'] = 'multiple';
802  break;
803  case 'select':
804  ‪$fields['type'] = 'multiple';
805  if (‪$fields['foreign_table']) {
806  ‪$fields['type'] = 'relation';
807  }
808  if (‪$fields['special']) {
809  ‪$fields['type'] = 'text';
810  }
811  break;
812  case 'group':
813  if (‪$fields['internal_type'] === 'db') {
814  ‪$fields['type'] = 'relation';
815  }
816  break;
817  case 'user':
818  case 'flex':
819  case 'passthrough':
820  case 'none':
821  case 'text':
822  default:
823  ‪$fields['type'] = 'text';
824  }
825  } else {
826  ‪$fields['label'] = '[FIELD: ' . $fieldName . ']';
827  switch ($fieldName) {
828  case 'pid':
829  ‪$fields['type'] = 'relation';
830  ‪$fields['allowed'] = 'pages';
831  break;
832  case 'cruser_id':
833  ‪$fields['type'] = 'relation';
834  ‪$fields['allowed'] = 'be_users';
835  break;
836  case 'tstamp':
837  case 'crdate':
838  ‪$fields['type'] = 'time';
839  break;
840  default:
841  ‪$fields['type'] = 'number';
842  }
843  }
844  }
845  switch (‪$fields['type']) {
846  case 'date':
847  if ($fieldValue != -1) {
848  $out = strftime('%d-%m-%Y', $fieldValue);
849  }
850  break;
851  case 'time':
852  if ($fieldValue != -1) {
853  if ($splitString === '<br />') {
854  $out = strftime('%H:%M' . $splitString . '%d-%m-%Y', $fieldValue);
855  } else {
856  $out = strftime('%H:%M %d-%m-%Y', $fieldValue);
857  }
858  }
859  break;
860  case 'multiple':
861  case 'binary':
862  case 'relation':
863  $out = $this->‪makeValueList($fieldName, $fieldValue, ‪$fields, $table, $splitString);
864  break;
865  case 'boolean':
866  $out = $fieldValue ? 'True' : 'False';
867  break;
868  default:
869  $out = htmlspecialchars($fieldValue);
870  }
871  return $out;
872  }
873 
884  public function ‪getTreeList($id, $depth, $begin = 0, $permsClause = null)
885  {
886  $depth = (int)$depth;
887  $begin = (int)$begin;
888  $id = (int)$id;
889  if ($id < 0) {
890  $id = abs($id);
891  }
892  if ($begin == 0) {
893  $theList = $id;
894  } else {
895  $theList = '';
896  }
897  if ($id && $depth > 0) {
898  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
899  $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
900  $statement = $queryBuilder->select('uid')
901  ->from('pages')
902  ->where(
903  $queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter($id, \PDO::PARAM_INT)),
904  $queryBuilder->expr()->eq('sys_language_uid', 0),
906  )
907  ->execute();
908  while ($row = $statement->fetch()) {
909  if ($begin <= 0) {
910  $theList .= ',' . $row['uid'];
911  }
912  if ($depth > 1) {
913  $theList .= $this->‪getTreeList($row['uid'], $depth - 1, $begin - 1, $permsClause);
914  }
915  }
916  }
917  return $theList;
918  }
919 
930  public function ‪makeValueList($fieldName, $fieldValue, $conf, $table, $splitString)
931  {
932  $from_table_Arr = [];
933  $fieldSetup = $conf;
934  $out = '';
935  if ($fieldSetup['type'] === 'multiple') {
936  foreach ($fieldSetup['items'] as $key => $val) {
937  if (strpos($val[0], 'LLL:') === 0) {
938  $value = $this->languageService->sL($val[0]);
939  } else {
940  $value = $val[0];
941  }
942  if (GeneralUtility::inList($fieldValue, $val[1]) || $fieldValue == $val[1]) {
943  if ($out !== '') {
944  $out .= $splitString;
945  }
946  $out .= htmlspecialchars($value);
947  }
948  }
949  }
950  if ($fieldSetup['type'] === 'binary') {
951  foreach ($fieldSetup['items'] as $Key => $val) {
952  if (strpos($val[0], 'LLL:') === 0) {
953  $value = $this->languageService->sL($val[0]);
954  } else {
955  $value = $val[0];
956  }
957  if ($out !== '') {
958  $out .= $splitString;
959  }
960  $out .= htmlspecialchars($value);
961  }
962  }
963  if ($fieldSetup['type'] === 'relation') {
964  $dontPrefixFirstTable = 0;
965  $useTablePrefix = 0;
966  if ($fieldSetup['items']) {
967  foreach ($fieldSetup['items'] as $key => $val) {
968  if (strpos($val[0], 'LLL:') === 0) {
969  $value = $this->languageService->sL($val[0]);
970  } else {
971  $value = $val[0];
972  }
973  if (GeneralUtility::inList($fieldValue, $value) || $fieldValue == $value) {
974  if ($out !== '') {
975  $out .= $splitString;
976  }
977  $out .= htmlspecialchars($value);
978  }
979  }
980  }
981  if (strpos($fieldSetup['allowed'], ',') !== false) {
982  $from_table_Arr = explode(',', $fieldSetup['allowed']);
983  $useTablePrefix = 1;
984  if (!$fieldSetup['prepend_tname']) {
985  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
986  $queryBuilder->getRestrictions()->removeAll()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
987  $statement = $queryBuilder->select($fieldName)->from($table)->execute();
988  while ($row = $statement->fetch()) {
989  if (strpos($row[$fieldName], ',') !== false) {
990  $checkContent = explode(',', $row[$fieldName]);
991  foreach ($checkContent as $singleValue) {
992  if (strpos($singleValue, '_') === false) {
993  $dontPrefixFirstTable = 1;
994  }
995  }
996  } else {
997  $singleValue = $row[$fieldName];
998  if ($singleValue !== '' && strpos($singleValue, '_') === false) {
999  $dontPrefixFirstTable = 1;
1000  }
1001  }
1002  }
1003  }
1004  } else {
1005  $from_table_Arr[0] = $fieldSetup['allowed'];
1006  }
1007  if ($fieldSetup['prepend_tname']) {
1008  $useTablePrefix = 1;
1009  }
1010  if ($fieldSetup['foreign_table']) {
1011  $from_table_Arr[0] = $fieldSetup['foreign_table'];
1012  }
1013  $counter = 0;
1014  $useSelectLabels = 0;
1015  $useAltSelectLabels = 0;
1016  $tablePrefix = '';
1017  $labelFieldSelect = [];
1018  foreach ($from_table_Arr as $from_table) {
1019  if ($useTablePrefix && !$dontPrefixFirstTable && $counter != 1 || $counter == 1) {
1020  $tablePrefix = $from_table . '_';
1021  }
1022  $counter = 1;
1023  if (is_array(‪$GLOBALS['TCA'][$from_table])) {
1024  $labelField = ‪$GLOBALS['TCA'][$from_table]['ctrl']['label'];
1025  $altLabelField = ‪$GLOBALS['TCA'][$from_table]['ctrl']['label_alt'];
1026  if (‪$GLOBALS['TCA'][$from_table]['columns'][$labelField]['config']['items']) {
1027  $items = ‪$GLOBALS['TCA'][$from_table]['columns'][$labelField]['config']['items'];
1028  foreach ($items as $labelArray) {
1029  if (strpos($labelArray[0], 'LLL:') === 0) {
1030  $labelFieldSelect[$labelArray[1]] = $this->languageService->sL($labelArray[0]);
1031  } else {
1032  $labelFieldSelect[$labelArray[1]] = $labelArray[0];
1033  }
1034  }
1035  $useSelectLabels = 1;
1036  }
1037  $altLabelFieldSelect = [];
1038  if (‪$GLOBALS['TCA'][$from_table]['columns'][$altLabelField]['config']['items']) {
1039  $items = ‪$GLOBALS['TCA'][$from_table]['columns'][$altLabelField]['config']['items'];
1040  foreach ($items as $altLabelArray) {
1041  if (strpos($altLabelArray[0], 'LLL:') === 0) {
1042  $altLabelFieldSelect[$altLabelArray[1]] = $this->languageService->sL($altLabelArray[0]);
1043  } else {
1044  $altLabelFieldSelect[$altLabelArray[1]] = $altLabelArray[0];
1045  }
1046  }
1047  $useAltSelectLabels = 1;
1048  }
1049 
1050  if (!$this->tableArray[$from_table]) {
1051  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($from_table);
1052  $queryBuilder->getRestrictions()->removeAll();
1053  if (empty($this->settings['show_deleted'])) {
1054  $queryBuilder->getRestrictions()->add(GeneralUtility::makeInstance(DeletedRestriction::class));
1055  }
1056  $selectFields = ['uid', $labelField];
1057  if ($altLabelField) {
1058  $selectFields[] = $altLabelField;
1059  }
1060  $queryBuilder->select(...$selectFields)
1061  ->from($from_table)
1062  ->orderBy('uid');
1063  if (!$this->backendUserAuthentication->isAdmin() && ‪$GLOBALS['TYPO3_CONF_VARS']['BE']['lockBeUserToDBmounts']) {
1064  $webMounts = $this->backendUserAuthentication->returnWebmounts();
1065  $perms_clause = $this->backendUserAuthentication->getPagePermsClause(‪Permission::PAGE_SHOW);
1066  $webMountPageTree = '';
1067  $webMountPageTreePrefix = '';
1068  foreach ($webMounts as $webMount) {
1069  if ($webMountPageTree) {
1070  $webMountPageTreePrefix = ',';
1071  }
1072  $webMountPageTree .= $webMountPageTreePrefix
1073  . $this->‪getTreeList($webMount, 999, $begin = 0, $perms_clause);
1074  }
1075  if ($from_table === 'pages') {
1076  $queryBuilder->where(
1078  $queryBuilder->expr()->in(
1079  'uid',
1080  $queryBuilder->createNamedParameter(
1081  ‪GeneralUtility::intExplode(',', $webMountPageTree),
1082  Connection::PARAM_INT_ARRAY
1083  )
1084  )
1085  );
1086  } else {
1087  $queryBuilder->where(
1088  $queryBuilder->expr()->in(
1089  'pid',
1090  $queryBuilder->createNamedParameter(
1091  ‪GeneralUtility::intExplode(',', $webMountPageTree),
1092  Connection::PARAM_INT_ARRAY
1093  )
1094  )
1095  );
1096  }
1097  }
1098  $statement = $queryBuilder->execute();
1099  $this->tableArray[$from_table] = [];
1100  while ($row = $statement->fetch()) {
1101  $this->tableArray[$from_table][] = $row;
1102  }
1103  }
1104 
1105  foreach ($this->tableArray[$from_table] as $key => $val) {
1106  $this->settings['labels_noprefix'] =
1107  $this->settings['labels_noprefix'] == 1
1108  ? 'on'
1109  : $this->settings['labels_noprefix'];
1110  $prefixString =
1111  $this->settings['labels_noprefix'] === 'on'
1112  ? ''
1113  : ' [' . $tablePrefix . $val['uid'] . '] ';
1114  if ($out !== '') {
1115  $out .= $splitString;
1116  }
1117  if (GeneralUtility::inList($fieldValue, $tablePrefix . $val['uid'])
1118  || $fieldValue == $tablePrefix . $val['uid']) {
1119  if ($useSelectLabels) {
1120  $out .= htmlspecialchars($prefixString . $labelFieldSelect[$val[$labelField]]);
1121  } elseif ($val[$labelField]) {
1122  $out .= htmlspecialchars($prefixString . $val[$labelField]);
1123  } elseif ($useAltSelectLabels) {
1124  $out .= htmlspecialchars($prefixString . $altLabelFieldSelect[$val[$altLabelField]]);
1125  } else {
1126  $out .= htmlspecialchars($prefixString . $val[$altLabelField]);
1127  }
1128  }
1129  }
1130  }
1131  }
1132  }
1133  return $out;
1134  }
1135 
1143  public function ‪resultRowTitles($row, $conf)
1144  {
1145  $tableHeader = [];
1146  // Start header row
1147  $tableHeader[] = '<thead><tr>';
1148  // Iterate over given columns
1149  foreach ($row as $fieldName => $fieldValue) {
1150  if (GeneralUtility::inList($this->settings['queryFields'], $fieldName)
1151  || !$this->settings['queryFields']
1152  && $fieldName !== 'pid'
1153  && $fieldName !== 'deleted'
1154  ) {
1155  if ($this->settings['search_result_labels']) {
1156  $title = $this->languageService->sL($conf['columns'][$fieldName]['label']
1157  ?: $fieldName);
1158  } else {
1159  $title = $this->languageService->sL($fieldName);
1160  }
1161  $tableHeader[] = '<th>' . htmlspecialchars($title) . '</th>';
1162  }
1163  }
1164  // Add empty icon column
1165  $tableHeader[] = '<th></th>';
1166  // Close header row
1167  $tableHeader[] = '</tr></thead>';
1168  return implode(LF, $tableHeader);
1169  }
1170 
1179  public function ‪csvRowTitles($row, $conf)
1180  {
1181  $out = '';
1182  foreach ($row as $fieldName => $fieldValue) {
1183  if (GeneralUtility::inList($this->settings['queryFields'], $fieldName)
1184  || !$this->settings['queryFields'] && $fieldName !== 'pid') {
1185  if ($out !== '') {
1186  $out .= ',';
1187  }
1188  if ($this->settings['search_result_labels']) {
1189  $out .= htmlspecialchars(
1190  $this->languageService->sL(
1191  $conf['columns'][$fieldName]['label']
1192  ?: $fieldName
1193  )
1194  );
1195  } else {
1196  $out .= htmlspecialchars($this->languageService->sL($fieldName));
1197  }
1198  }
1199  }
1200  return $out;
1201  }
1202 
1208  public function ‪setFormName(‪$formName)
1209  {
1210  $this->formName = trim(‪$formName);
1211  }
1212 
1217  private function ‪renderNoResultsFoundMessage()
1218  {
1219  $flashMessage = GeneralUtility::makeInstance(FlashMessage::class, 'No rows selected!', '', ‪FlashMessage::INFO);
1220  $flashMessageService = GeneralUtility::makeInstance(FlashMessageService::class);
1221  $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
1222  $defaultFlashMessageQueue->enqueue($flashMessage);
1223  }
1224 }
‪TYPO3\CMS\Core\Database\QueryView\renderNoResultsFoundMessage
‪renderNoResultsFoundMessage()
Definition: QueryView.php:1206
‪TYPO3\CMS\Core\Database\QueryView\resultRowDisplay
‪string resultRowDisplay($row, $conf, $table)
Definition: QueryView.php:662
‪TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL
‪const SIZE_SMALL
Definition: Icon.php:30
‪TYPO3\CMS\Core\Database\QueryView\__construct
‪__construct(array $settings=null, $menuItems=null, $moduleName=null)
Definition: QueryView.php:93
‪TYPO3\CMS\Core\Database\QueryView\setFormName
‪setFormName($formName)
Definition: QueryView.php:1197
‪TYPO3\CMS\Core\Database\QueryView\cleanStoreQueryConfigs
‪array cleanStoreQueryConfigs($storeQueryConfigs, $storeArray)
Definition: QueryView.php:191
‪TYPO3\CMS\Core\Database\QueryView\$languageService
‪LanguageService $languageService
Definition: QueryView.php:69
‪TYPO3\CMS\Core\Imaging\Icon
Definition: Icon.php:26
‪TYPO3\CMS\Core\Utility\CsvUtility\csvValues
‪static string csvValues(array $row, string $delim=',', string $quote='"', int $type = self::TYPE_REMOVE_CONTROLS)
Definition: CsvUtility.php:100
‪TYPO3\CMS\Core\Database\QueryView\procesStoreControl
‪string procesStoreControl()
Definition: QueryView.php:295
‪TYPO3\CMS\Core\Database\QueryView\$iconFactory
‪TYPO3 CMS Core Imaging IconFactory $iconFactory
Definition: QueryView.php:61
‪TYPO3\CMS\Core\Database\QueryView\$hookArray
‪array $hookArray
Definition: QueryView.php:53
‪TYPO3\CMS\Core\Imaging\IconFactory
Definition: IconFactory.php:33
‪TYPO3\CMS\Core\Database\QueryView\addToStoreQueryConfigs
‪array addToStoreQueryConfigs($storeQueryConfigs, $index)
Definition: QueryView.php:210
‪TYPO3\CMS\Core\Database\QueryView
Definition: QueryView.php:42
‪TYPO3\CMS\Core\Messaging\FlashMessageRendererResolver
Definition: FlashMessageRendererResolver.php:31
‪$fields
‪$fields
Definition: pages.php:5
‪TYPO3\CMS\Core\Database\QueryView\$tableArray
‪array $tableArray
Definition: QueryView.php:65
‪TYPO3\CMS\Core\Type\Bitmask\Permission
Definition: Permission.php:24
‪TYPO3\CMS\Core\Database\QueryView\$storeList
‪string $storeList
Definition: QueryView.php:45
‪TYPO3\CMS\Core\Database\QueryView\getProcessedValueExtra
‪string getProcessedValueExtra($table, $fieldName, $fieldValue, $conf, $splitString)
Definition: QueryView.php:759
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility
Definition: ExtensionManagementUtility.php:43
‪TYPO3\CMS\Core\Database\QueryView\$moduleName
‪string $moduleName
Definition: QueryView.php:86
‪TYPO3\CMS\Core\Database\QueryView\$settings
‪array $settings
Definition: QueryView.php:78
‪TYPO3\CMS\Core\Database\Query\QueryHelper
Definition: QueryHelper.php:32
‪TYPO3\CMS\Core\Database\QueryView\csvValues
‪string csvValues($row, $delim=',', $quote='"', $conf = [], $table = '')
Definition: QueryView.php:567
‪TYPO3\CMS\Core\Database\QueryView\$backendUserAuthentication
‪BackendUserAuthentication $backendUserAuthentication
Definition: QueryView.php:73
‪TYPO3\CMS\Core\Database\QueryView\makeValueList
‪string makeValueList($fieldName, $fieldValue, $conf, $table, $splitString)
Definition: QueryView.php:919
‪TYPO3\CMS\Backend\Routing\UriBuilder
Definition: UriBuilder.php:38
‪TYPO3\CMS\Core\Utility\HttpUtility\buildQueryString
‪static string buildQueryString(array $parameters, string $prependCharacter='', bool $skipEmptyParameters=false)
Definition: HttpUtility.php:163
‪TYPO3\CMS\Core\Utility\DebugUtility\viewArray
‪static string viewArray($array_in)
Definition: DebugUtility.php:196
‪TYPO3\CMS\Core\Database\QueryView\search
‪string search()
Definition: QueryView.php:583
‪TYPO3\CMS\Backend\Utility\BackendUtility\getModuleData
‪static array getModuleData( $MOD_MENU, $CHANGED_SETTINGS, $modName, $type='', $dontValidateList='', $setDefaultList='')
Definition: BackendUtility.php:2893
‪TYPO3\CMS\Core\Utility\CsvUtility
Definition: CsvUtility.php:24
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:62
‪TYPO3\CMS\Core\Type\Bitmask\Permission\PAGE_SHOW
‪const PAGE_SHOW
Definition: Permission.php:33
‪TYPO3\CMS\Core\Database\QueryView\initStoreArray
‪array initStoreArray()
Definition: QueryView.php:172
‪TYPO3\CMS\Backend\Utility\BackendUtility
Definition: BackendUtility.php:75
‪TYPO3\CMS\Core\Utility\DebugUtility
Definition: DebugUtility.php:25
‪TYPO3\CMS\Backend\Utility\BackendUtility\getRecord
‪static array null getRecord($table, $uid, $fields=' *', $where='', $useDeleteClause=true)
Definition: BackendUtility.php:95
‪TYPO3\CMS\Core\Database\QueryView\makeStoreControl
‪string makeStoreControl()
Definition: QueryView.php:127
‪$output
‪$output
Definition: annotationChecker.php:119
‪TYPO3\CMS\Core\Messaging\AbstractMessage\INFO
‪const INFO
Definition: AbstractMessage.php:28
‪TYPO3\CMS\Core\Messaging\FlashMessage
Definition: FlashMessage.php:24
‪TYPO3\CMS\Core\Database\Query\QueryHelper\stripLogicalOperatorPrefix
‪static string stripLogicalOperatorPrefix(string $constraint)
Definition: QueryHelper.php:165
‪TYPO3\CMS\Core\Database\QueryView\queryMaker
‪string queryMaker()
Definition: QueryView.php:401
‪TYPO3\CMS\Core\Database\QueryView\$menuItems
‪array $menuItems
Definition: QueryView.php:82
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Core\Database\QueryView\getTreeList
‪string getTreeList($id, $depth, $begin=0, $permsClause=null)
Definition: QueryView.php:873
‪TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction
Definition: DeletedRestriction.php:28
‪TYPO3\CMS\Core\Database\QueryView\csvRowTitles
‪string csvRowTitles($row, $conf)
Definition: QueryView.php:1168
‪TYPO3\CMS\Core\Utility\GeneralUtility\intExplode
‪static int[] intExplode($delimiter, $string, $removeEmptyValues=false, $limit=0)
Definition: GeneralUtility.php:988
‪TYPO3\CMS\Core\Database\QueryView\saveQueryInAction
‪int saveQueryInAction($uid)
Definition: QueryView.php:226
‪TYPO3\CMS\Core\Database\QueryView\$noDownloadB
‪int $noDownloadB
Definition: QueryView.php:49
‪TYPO3\CMS\Core\Utility\HttpUtility
Definition: HttpUtility.php:24
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:42
‪TYPO3\CMS\Core\Database\QueryView\$formName
‪string $formName
Definition: QueryView.php:57
‪TYPO3\CMS\Core\Database\QueryView\getQueryResultCode
‪array getQueryResultCode($type, array $dataRows, $table)
Definition: QueryView.php:481
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility\isLoaded
‪static bool isLoaded($key)
Definition: ExtensionManagementUtility.php:114
‪TYPO3\CMS\Core\Database\QueryView\loadStoreQueryConfigs
‪array loadStoreQueryConfigs($storeQueryConfigs, $storeIndex, $writeArray)
Definition: QueryView.php:279
‪TYPO3\CMS\Core\Messaging\FlashMessageService
Definition: FlashMessageService.php:27
‪TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR
‪const ERROR
Definition: AbstractMessage.php:31
‪TYPO3\CMS\Core\Database\QueryView\form
‪string form()
Definition: QueryView.php:109
‪TYPO3\CMS\Core\Database
Definition: Connection.php:18
‪TYPO3\CMS\Core\Database\Connection\PARAM_LOB
‪const PARAM_LOB
Definition: Connection.php:57
‪TYPO3\CMS\Core\Database\QueryView\resultRowTitles
‪string resultRowTitles($row, $conf)
Definition: QueryView.php:1132