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