‪TYPO3CMS  10.4
AbstractPlugin.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\Driver\Statement;
34 
42 {
48  public ‪$cObj;
49 
55  public ‪$prefixId;
56 
62  public ‪$scriptRelPath;
63 
69  public ‪$extKey;
70 
78  public ‪$piVars = [
79  'pointer' => '',
80  // Used as a pointer for lists
81  'mode' => '',
82  // List mode
83  'sword' => '',
84  // Search word
85  'sort' => ''
86  ];
87 
95  public ‪$internal = ['res_count' => 0, 'results_at_a_time' => 20, 'maxPages' => 10, 'currentRow' => [], 'currentTable' => ''];
96 
102  public ‪$LOCAL_LANG = [];
103 
112  protected ‪$LOCAL_LANG_UNSET = [];
113 
120  public ‪$LOCAL_LANG_loaded = false;
121 
127  public ‪$LLkey = 'default';
128 
134  public ‪$altLLkey = '';
135 
142  public ‪$LLtestPrefix = '';
143 
150  public ‪$LLtestPrefixAlt = '';
151 
155  public ‪$pi_isOnlyFields = 'mode,pointer';
156 
160  public ‪$pi_alwaysPrev = 0;
161 
165  public ‪$pi_lowerThan = 5;
166 
170  public ‪$pi_moreParams = '';
171 
175  public ‪$pi_listFields = '*';
176 
181 
185  public ‪$pi_autoCacheEn = false;
186 
195  public ‪$conf = [];
196 
202  public ‪$pi_EPtemp_cObj;
203 
207  public ‪$pi_tmpPageId = 0;
208 
214  protected ‪$frontendController;
215 
219  protected ‪$templateService;
220 
230  {
231  $this->frontendController = ‪$frontendController ?: ‪$GLOBALS['TSFE'];
232  $this->templateService = GeneralUtility::makeInstance(MarkerBasedTemplateService::class);
233  // Setting piVars:
234  if ($this->prefixId) {
235  $this->piVars = GeneralUtility::_GPmerged($this->prefixId);
236  }
237  $this->LLkey = $this->frontendController->getLanguage()->getTypo3Language();
238 
240  ‪$locales = GeneralUtility::makeInstance(Locales::class);
241  if (in_array($this->LLkey, ‪$locales->getLocales())) {
242  foreach (‪$locales->getLocaleDependencies($this->LLkey) as $language) {
243  $this->altLLkey .= $language . ',';
244  }
245  $this->altLLkey = rtrim($this->altLLkey, ',');
246  }
247  }
248 
256  protected function ‪applyStdWrapRecursive(array ‪$conf, $level = 0)
257  {
258  foreach (‪$conf as $key => $confNextLevel) {
259  if (strpos($key, '.') !== false) {
260  $key = substr($key, 0, -1);
261 
262  // descend into all non-stdWrap-subelements first
263  foreach ($confNextLevel as $subKey => $subConfNextLevel) {
264  if (is_array($subConfNextLevel) && strpos($subKey, '.') !== false && $subKey !== 'stdWrap.') {
265  ‪$conf[$key . '.'] = $this->‪applyStdWrapRecursive($confNextLevel, $level + 1);
266  }
267  }
268 
269  // now for stdWrap
270  foreach ($confNextLevel as $subKey => $subConfNextLevel) {
271  if (is_array($subConfNextLevel) && $subKey === 'stdWrap.') {
272  ‪$conf[$key] = $this->cObj->stdWrap(‪$conf[$key] ?? '', ‪$conf[$key . '.']['stdWrap.'] ?? []);
273  unset(‪$conf[$key . '.']['stdWrap.']);
274  if (empty(‪$conf[$key . '.'])) {
275  unset(‪$conf[$key . '.']);
276  }
277  }
278  }
279  }
280  }
281  return ‪$conf;
282  }
283 
287  public function ‪pi_setPiVarDefaults()
288  {
289  if (isset($this->conf['_DEFAULT_PI_VARS.']) && is_array($this->conf['_DEFAULT_PI_VARS.'])) {
290  $this->conf['_DEFAULT_PI_VARS.'] = $this->‪applyStdWrapRecursive($this->conf['_DEFAULT_PI_VARS.']);
291  $typoScriptService = GeneralUtility::makeInstance(TypoScriptService::class);
292  $tmp = $typoScriptService->convertTypoScriptArrayToPlainArray($this->conf['_DEFAULT_PI_VARS.']);
293  ‪ArrayUtility::mergeRecursiveWithOverrule($tmp, is_array($this->piVars) ? $this->piVars : []);
294  $tmp = $this->‪removeInternalNodeValue($tmp);
295  $this->piVars = $tmp;
296  }
297  }
298 
305  protected function ‪removeInternalNodeValue(array $typoscript): array
306  {
307  foreach ($typoscript as $key => $value) {
308  if ($key === '_typoScriptNodeValue') {
309  unset($typoscript[$key]);
310  }
311  if (is_array($value)) {
312  $typoscript[$key] = $this->‪removeInternalNodeValue($value);
313  }
314  }
315 
316  return $typoscript;
317  }
318 
319  /***************************
320  *
321  * Link functions
322  *
323  **************************/
338  public function ‪pi_getPageLink($id, $target = '', $urlParameters = [])
339  {
340  return $this->cObj->getTypoLink_URL($id, $urlParameters, $target);
341  }
342 
356  public function ‪pi_linkToPage($str, $id, $target = '', $urlParameters = [])
357  {
358  return $this->cObj->getTypoLink($str, $id, $urlParameters, $target);
359  }
360 
373  public function ‪pi_linkTP($str, $urlParameters = [], $cache = false, $altPageId = 0)
374  {
375  ‪$conf = [];
376  if (!$cache) {
377  ‪$conf['no_cache'] = true;
378  }
379  ‪$conf['parameter'] = $altPageId ?: ($this->pi_tmpPageId ?: 'current');
380  ‪$conf['additionalParams'] = $this->conf['parent.']['addParams'] . ‪HttpUtility::buildQueryString($urlParameters, '&', true) . ‪$this->pi_moreParams;
381  return $this->cObj->typoLink($str, ‪$conf);
382  }
383 
397  public function ‪pi_linkTP_keepPIvars($str, $overrulePIvars = [], $cache = false, $clearAnyway = false, $altPageId = 0)
398  {
399  if (is_array($this->piVars) && is_array($overrulePIvars) && !$clearAnyway) {
401  unset(‪$piVars['DATA']);
403  $overrulePIvars = ‪$piVars;
404  if ($this->pi_autoCacheEn) {
405  $cache = (bool)$this->‪pi_autoCache($overrulePIvars);
406  }
407  }
408  return $this->‪pi_linkTP($str, [$this->prefixId => $overrulePIvars], $cache, $altPageId);
409  }
410 
422  public function ‪pi_linkTP_keepPIvars_url($overrulePIvars = [], $cache = false, $clearAnyway = false, $altPageId = 0)
423  {
424  $this->‪pi_linkTP_keepPIvars('|', $overrulePIvars, $cache, $clearAnyway, $altPageId);
425  return $this->cObj->lastTypoLinkUrl;
426  }
427 
442  public function ‪pi_list_linkSingle($str, $uid, $cache = false, $mergeArr = [], $urlOnly = false, $altPageId = 0)
443  {
444  if ($this->prefixId) {
445  if ($cache) {
446  $overrulePIvars = $uid ? ['showUid' => $uid] : [];
447  $overrulePIvars = array_merge($overrulePIvars, (array)$mergeArr);
448  $str = $this->‪pi_linkTP($str, [$this->prefixId => $overrulePIvars], $cache, $altPageId);
449  } else {
450  $overrulePIvars = ['showUid' => $uid ?: ''];
451  $overrulePIvars = array_merge($overrulePIvars, (array)$mergeArr);
452  $str = $this->‪pi_linkTP_keepPIvars($str, $overrulePIvars, $cache, false, $altPageId);
453  }
454  // If urlOnly flag, return only URL as it has recently be generated.
455  if ($urlOnly) {
456  $str = $this->cObj->lastTypoLinkUrl;
457  }
458  }
459  return $str;
460  }
461 
470  public function ‪pi_openAtagHrefInJSwindow($str, $winName = '', $winParams = 'width=670,height=500,status=0,menubar=0,scrollbars=1,resizable=1')
471  {
472  if (preg_match('/(.*)(<a[^>]*>)(.*)/i', $str, $match)) {
473  // decode HTML entities, `href` is used in escaped JavaScript context
474  $aTagContent = GeneralUtility::get_tag_attributes($match[2], true);
475  $onClick = 'vHWin=window.open('
476  . GeneralUtility::quoteJSvalue($this->frontendController->baseUrlWrap($aTagContent['href'])) . ','
477  . GeneralUtility::quoteJSvalue($winName ?: md5($aTagContent['href'])) . ','
478  . GeneralUtility::quoteJSvalue($winParams) . ');vHWin.focus();return false;';
479  $match[2] = '<a href="#" onclick="' . htmlspecialchars($onClick) . '">';
480  $str = $match[1] . $match[2] . $match[3];
481  }
482  return $str;
483  }
484 
485  /***************************
486  *
487  * Functions for listing, browsing, searching etc.
488  *
489  **************************/
514  public function ‪pi_list_browseresults($showResultCount = 1, $tableParams = '', $wrapArr = [], $pointerName = 'pointer', $hscText = true, $forceOutput = false)
515  {
516  $wrapper = [];
517  $markerArray = [];
518  foreach (‪$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['pi_list_browseresults'] ?? [] as $classRef) {
519  $hookObj = GeneralUtility::makeInstance($classRef);
520  if (method_exists($hookObj, 'pi_list_browseresults')) {
521  $pageBrowser = $hookObj->pi_list_browseresults($showResultCount, $tableParams, $wrapArr, $pointerName, $hscText, $forceOutput, $this);
522  if (is_string($pageBrowser) && trim($pageBrowser) !== '') {
523  return $pageBrowser;
524  }
525  }
526  }
527  // example $wrapArr-array how it could be traversed from an extension
528  /* $wrapArr = array(
529  'browseBoxWrap' => '<div class="browseBoxWrap">|</div>',
530  'showResultsWrap' => '<div class="showResultsWrap">|</div>',
531  'browseLinksWrap' => '<div class="browseLinksWrap">|</div>',
532  'showResultsNumbersWrap' => '<span class="showResultsNumbersWrap">|</span>',
533  'disabledLinkWrap' => '<span class="disabledLinkWrap">|</span>',
534  'inactiveLinkWrap' => '<span class="inactiveLinkWrap">|</span>',
535  'activeLinkWrap' => '<span class="activeLinkWrap">|</span>'
536  );*/
537  // Initializing variables:
538  $pointer = (int)$this->piVars[$pointerName];
539  $count = (int)$this->internal['res_count'];
540  $results_at_a_time = ‪MathUtility::forceIntegerInRange($this->internal['results_at_a_time'], 1, 1000);
541  $totalPages = (int)ceil($count / $results_at_a_time);
542  $maxPages = ‪MathUtility::forceIntegerInRange($this->internal['maxPages'], 1, 100);
544  if (!$forceOutput && $count <= $results_at_a_time) {
545  return '';
546  }
547  // $showResultCount determines how the results of the pagerowser will be shown.
548  // If set to 0: only the result-browser will be shown
549  // 1: (default) the text "Displaying results..." and the result-browser will be shown.
550  // 2: only the text "Displaying results..." will be shown
551  $showResultCount = (int)$showResultCount;
552  // If this is set, two links named "<< First" and "LAST >>" will be shown and point to the very first or last page.
553  $showFirstLast = !empty($this->internal['showFirstLast']);
554  // If this has a value the "previous" button is always visible (will be forced if "showFirstLast" is set)
555  $alwaysPrev = $showFirstLast ? 1 : ‪$this->pi_alwaysPrev;
556  if (isset($this->internal['pagefloat'])) {
557  if (strtoupper($this->internal['pagefloat']) === 'CENTER') {
558  $pagefloat = ceil(($maxPages - 1) / 2);
559  } else {
560  // pagefloat set as integer. 0 = left, value >= $this->internal['maxPages'] = right
561  $pagefloat = ‪MathUtility::forceIntegerInRange($this->internal['pagefloat'], -1, $maxPages - 1);
562  }
563  } else {
564  // pagefloat disabled
565  $pagefloat = -1;
566  }
567  // Default values for "traditional" wrapping with a table. Can be overwritten by vars from $wrapArr
568  $wrapper['disabledLinkWrap'] = '<td class="nowrap"><p>|</p></td>';
569  $wrapper['inactiveLinkWrap'] = '<td class="nowrap"><p>|</p></td>';
570  $wrapper['activeLinkWrap'] = '<td' . $this->‪pi_classParam('browsebox-SCell') . ' class="nowrap"><p>|</p></td>';
571  $wrapper['browseLinksWrap'] = rtrim('<table ' . $tableParams) . '><tr>|</tr></table>';
572  $wrapper['showResultsWrap'] = '<p>|</p>';
573  $wrapper['browseBoxWrap'] = '
574  <!--
575  List browsing box:
576  -->
577  <div ' . $this->‪pi_classParam('browsebox') . '>
578  |
579  </div>';
580  // Now overwrite all entries in $wrapper which are also in $wrapArr
581  $wrapper = array_merge($wrapper, $wrapArr);
582  // Show pagebrowser
583  if ($showResultCount != 2) {
584  if ($pagefloat > -1) {
585  $lastPage = min($totalPages, max($pointer + 1 + $pagefloat, $maxPages));
586  $firstPage = max(0, $lastPage - $maxPages);
587  } else {
588  $firstPage = 0;
589  $lastPage = ‪MathUtility::forceIntegerInRange($totalPages, 1, $maxPages);
590  }
591  $links = [];
592  // Make browse-table/links:
593  // Link to first page
594  if ($showFirstLast) {
595  if ($pointer > 0) {
596  $label = $this->‪pi_getLL('pi_list_browseresults_first', '<< First');
597  $links[] = $this->cObj->wrap($this->‪pi_linkTP_keepPIvars($hscText ? htmlspecialchars($label) : $label, [$pointerName => null], ‪$pi_isOnlyFields), $wrapper['inactiveLinkWrap']);
598  } else {
599  $label = $this->‪pi_getLL('pi_list_browseresults_first', '<< First');
600  $links[] = $this->cObj->wrap($hscText ? htmlspecialchars($label) : $label, $wrapper['disabledLinkWrap']);
601  }
602  }
603  // Link to previous page
604  if ($alwaysPrev >= 0) {
605  if ($pointer > 0) {
606  $label = $this->‪pi_getLL('pi_list_browseresults_prev', '< Previous');
607  $links[] = $this->cObj->wrap($this->‪pi_linkTP_keepPIvars($hscText ? htmlspecialchars($label) : $label, [$pointerName => ($pointer - 1) ?: ''], ‪$pi_isOnlyFields), $wrapper['inactiveLinkWrap']);
608  } elseif ($alwaysPrev) {
609  $label = $this->‪pi_getLL('pi_list_browseresults_prev', '< Previous');
610  $links[] = $this->cObj->wrap($hscText ? htmlspecialchars($label) : $label, $wrapper['disabledLinkWrap']);
611  }
612  }
613  // Links to pages
614  for ($a = $firstPage; $a < $lastPage; $a++) {
615  if ($this->internal['showRange']) {
616  $pageText = ($a * $results_at_a_time + 1) . '-' . min($count, ($a + 1) * $results_at_a_time);
617  } else {
618  $label = $this->‪pi_getLL('pi_list_browseresults_page', 'Page');
619  $pageText = trim(($hscText ? htmlspecialchars($label) : $label) . ' ' . ($a + 1));
620  }
621  // Current page
622  if ($pointer == $a) {
623  if ($this->internal['dontLinkActivePage']) {
624  $links[] = $this->cObj->wrap($pageText, $wrapper['activeLinkWrap']);
625  } else {
626  $links[] = $this->cObj->wrap($this->‪pi_linkTP_keepPIvars($pageText, [$pointerName => $a ?: ''], ‪$pi_isOnlyFields), $wrapper['activeLinkWrap']);
627  }
628  } else {
629  $links[] = $this->cObj->wrap($this->‪pi_linkTP_keepPIvars($pageText, [$pointerName => $a ?: ''], ‪$pi_isOnlyFields), $wrapper['inactiveLinkWrap']);
630  }
631  }
632  if ($pointer < $totalPages - 1 || $showFirstLast) {
633  // Link to next page
634  if ($pointer >= $totalPages - 1) {
635  $label = $this->‪pi_getLL('pi_list_browseresults_next', 'Next >');
636  $links[] = $this->cObj->wrap($hscText ? htmlspecialchars($label) : $label, $wrapper['disabledLinkWrap']);
637  } else {
638  $label = $this->‪pi_getLL('pi_list_browseresults_next', 'Next >');
639  $links[] = $this->cObj->wrap($this->‪pi_linkTP_keepPIvars($hscText ? htmlspecialchars($label) : $label, [$pointerName => $pointer + 1], ‪$pi_isOnlyFields), $wrapper['inactiveLinkWrap']);
640  }
641  }
642  // Link to last page
643  if ($showFirstLast) {
644  if ($pointer < $totalPages - 1) {
645  $label = $this->‪pi_getLL('pi_list_browseresults_last', 'Last >>');
646  $links[] = $this->cObj->wrap($this->‪pi_linkTP_keepPIvars($hscText ? htmlspecialchars($label) : $label, [$pointerName => $totalPages - 1], ‪$pi_isOnlyFields), $wrapper['inactiveLinkWrap']);
647  } else {
648  $label = $this->‪pi_getLL('pi_list_browseresults_last', 'Last >>');
649  $links[] = $this->cObj->wrap($hscText ? htmlspecialchars($label) : $label, $wrapper['disabledLinkWrap']);
650  }
651  }
652  $theLinks = $this->cObj->wrap(implode(LF, $links), $wrapper['browseLinksWrap']);
653  } else {
654  $theLinks = '';
655  }
656  $pR1 = $pointer * $results_at_a_time + 1;
657  $pR2 = $pointer * $results_at_a_time + $results_at_a_time;
658  if ($showResultCount) {
659  if ($wrapper['showResultsNumbersWrap']) {
660  // This will render the resultcount in a more flexible way using markers (new in TYPO3 3.8.0).
661  // The formatting string is expected to hold template markers (see function header). Example: 'Displaying results ###FROM### to ###TO### out of ###OUT_OF###'
662  $markerArray['###FROM###'] = $this->cObj->wrap($this->internal['res_count'] > 0 ? $pR1 : 0, $wrapper['showResultsNumbersWrap']);
663  $markerArray['###TO###'] = $this->cObj->wrap(min($this->internal['res_count'], $pR2), $wrapper['showResultsNumbersWrap']);
664  $markerArray['###OUT_OF###'] = $this->cObj->wrap($this->internal['res_count'], $wrapper['showResultsNumbersWrap']);
665  $markerArray['###FROM_TO###'] = $this->cObj->wrap(($this->internal['res_count'] > 0 ? $pR1 : 0) . ' ' . $this->‪pi_getLL('pi_list_browseresults_to', 'to') . ' ' . min($this->internal['res_count'], $pR2), $wrapper['showResultsNumbersWrap']);
666  $markerArray['###CURRENT_PAGE###'] = $this->cObj->wrap($pointer + 1, $wrapper['showResultsNumbersWrap']);
667  $markerArray['###TOTAL_PAGES###'] = $this->cObj->wrap($totalPages, $wrapper['showResultsNumbersWrap']);
668  // Substitute markers
669  $resultCountMsg = $this->templateService->substituteMarkerArray($this->‪pi_getLL('pi_list_browseresults_displays', 'Displaying results ###FROM### to ###TO### out of ###OUT_OF###'), $markerArray);
670  } else {
671  // Render the resultcount in the "traditional" way using sprintf
672  $resultCountMsg = sprintf(str_replace('###SPAN_BEGIN###', '<span' . $this->‪pi_classParam('browsebox-strong') . '>', $this->‪pi_getLL('pi_list_browseresults_displays', 'Displaying results ###SPAN_BEGIN###%s to %s</span> out of ###SPAN_BEGIN###%s</span>')), $count > 0 ? $pR1 : 0, min($count, $pR2), $count);
673  }
674  $resultCountMsg = $this->cObj->wrap($resultCountMsg, $wrapper['showResultsWrap']);
675  } else {
676  $resultCountMsg = '';
677  }
678  $sTables = $this->cObj->wrap($resultCountMsg . $theLinks, $wrapper['browseBoxWrap']);
679  return $sTables;
680  }
681 
689  public function ‪pi_list_modeSelector($items = [], $tableParams = '')
690  {
691  $cells = [];
692  foreach ($items as $k => $v) {
693  $cells[] = '
694  <td' . ($this->piVars['mode'] == $k ? $this->‪pi_classParam('modeSelector-SCell') : '') . '><p>' . $this->‪pi_linkTP_keepPIvars(htmlspecialchars($v), ['mode' => $k], (bool)$this->‪pi_isOnlyFields($this->‪pi_isOnlyFields)) . '</p></td>';
695  }
696  $sTables = '
697 
698  <!--
699  Mode selector (menu for list):
700  -->
701  <div' . $this->‪pi_classParam('modeSelector') . '>
702  <' . rtrim('table ' . $tableParams) . '>
703  <tr>
704  ' . implode('', $cells) . '
705  </tr>
706  </table>
707  </div>';
708  return $sTables;
709  }
710 
724  public function ‪pi_list_makelist($statement, $tableParams = '')
725  {
726  // Make list table header:
727  $tRows = [];
728  $this->internal['currentRow'] = '';
729  $tRows[] = $this->‪pi_list_header();
730  // Make list table rows
731  $c = 0;
732  while ($this->internal['currentRow'] = $statement->fetch()) {
733  $tRows[] = $this->‪pi_list_row($c);
734  $c++;
735  }
736  $out = '
737 
738  <!--
739  Record list:
740  -->
741  <div' . $this->‪pi_classParam('listrow') . '>
742  <' . rtrim('table ' . $tableParams) . '>
743  ' . implode('', $tRows) . '
744  </table>
745  </div>';
746  return $out;
747  }
748 
757  public function ‪pi_list_row($c)
758  {
759  // Dummy
760  return '<tr' . ($c % 2 ? $this->‪pi_classParam('listrow-odd') : '') . '><td><p>[dummy row]</p></td></tr>';
761  }
762 
770  public function ‪pi_list_header()
771  {
772  return '<tr' . $this->‪pi_classParam('listrow-header') . '><td><p>[dummy header row]</p></td></tr>';
773  }
774 
775  /***************************
776  *
777  * Stylesheet, CSS
778  *
779  **************************/
786  public function ‪pi_getClassName($class)
787  {
788  return str_replace('_', '-', $this->prefixId) . ($this->prefixId ? '-' : '') . $class;
789  }
790 
800  public function ‪pi_classParam($class, $addClasses = '')
801  {
802  ‪$output = '';
803  $classNames = ‪GeneralUtility::trimExplode(',', $class);
804  foreach ($classNames as $className) {
805  ‪$output .= ' ' . $this->‪pi_getClassName($className);
806  }
807  $additionalClassNames = ‪GeneralUtility::trimExplode(',', $addClasses);
808  foreach ($additionalClassNames as $additionalClassName) {
809  ‪$output .= ' ' . $additionalClassName;
810  }
811  return ' class="' . trim(‪$output) . '"';
812  }
813 
821  public function ‪pi_wrapInBaseClass($str)
822  {
823  $content = '<div class="' . str_replace('_', '-', $this->prefixId) . '">
824  ' . $str . '
825  </div>
826  ';
827  if (!$this->frontendController->config['config']['disablePrefixComment']) {
828  $content = '
829 
830 
831  <!--
832 
833  BEGIN: Content of extension "' . $this->extKey . '", plugin "' . $this->prefixId . '"
834 
835  -->
836  ' . $content . '
837  <!-- END: Content of extension "' . $this->extKey . '", plugin "' . $this->prefixId . '" -->
838 
839  ';
840  }
841  return $content;
842  }
843 
844  /***************************
845  *
846  * Frontend editing: Edit panel, edit icons
847  *
848  **************************/
859  public function ‪pi_getEditPanel($row = [], $tablename = '', $label = '', ‪$conf = [])
860  {
861  $panel = '';
862  if (!$row || !$tablename) {
863  $row = $this->internal['currentRow'];
864  $tablename = $this->internal['currentTable'];
865  }
866  if ($this->frontendController->isBackendUserLoggedIn()) {
867  // Create local cObj if not set:
868  if (!is_object($this->pi_EPtemp_cObj)) {
869  $this->pi_EPtemp_cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);
870  $this->pi_EPtemp_cObj->setParent($this->cObj->data, $this->cObj->currentRecord);
871  }
872  // Initialize the cObj object with current row
873  $this->pi_EPtemp_cObj->start($row, $tablename);
874  // Setting TypoScript values in the $conf array. See documentation in TSref for the EDITPANEL cObject.
875  ‪$conf['allow'] = 'edit,new,delete,move,hide';
876  $panel = $this->pi_EPtemp_cObj->cObjGetSingle('EDITPANEL', ‪$conf, 'editpanel');
877  }
878  if ($panel) {
879  if ($label) {
880  return '<!-- BEGIN: EDIT PANEL --><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td valign="top">' . $label . '</td><td valign="top" align="right">' . $panel . '</td></tr></table><!-- END: EDIT PANEL -->';
881  }
882  return '<!-- BEGIN: EDIT PANEL -->' . $panel . '<!-- END: EDIT PANEL -->';
883  }
884  return $label;
885  }
886 
900  public function ‪pi_getEditIcon($content, ‪$fields, $title = '', $row = [], $tablename = '', $oConf = [])
901  {
902  if ($this->frontendController->isBackendUserLoggedIn()) {
903  if (!$row || !$tablename) {
904  $row = $this->internal['currentRow'];
905  $tablename = $this->internal['currentTable'];
906  }
907  $conf = array_merge([
908  'beforeLastTag' => 1,
909  'iconTitle' => $title
910  ], $oConf);
911  $content = $this->cObj->editIcons($content, $tablename . ':' . ‪$fields, ‪$conf, $tablename . ':' . $row['uid'], $row, '&viewUrl=' . rawurlencode(GeneralUtility::getIndpEnv('REQUEST_URI')));
912  }
913  return $content;
914  }
915 
916  /***************************
917  *
918  * Localization, locallang functions
919  *
920  **************************/
929  public function ‪pi_getLL($key, $alternativeLabel = '')
930  {
931  $word = null;
932  if (!empty($this->LOCAL_LANG[$this->LLkey][$key][0]['target'])
933  || isset($this->LOCAL_LANG_UNSET[$this->LLkey][$key])
934  ) {
935  $word = $this->LOCAL_LANG[‪$this->LLkey][$key][0]['target'];
936  } elseif ($this->altLLkey) {
937  $alternativeLanguageKeys = ‪GeneralUtility::trimExplode(',', $this->altLLkey, true);
938  $alternativeLanguageKeys = array_reverse($alternativeLanguageKeys);
939  foreach ($alternativeLanguageKeys as $languageKey) {
940  if (!empty($this->LOCAL_LANG[$languageKey][$key][0]['target'])
941  || isset($this->LOCAL_LANG_UNSET[$languageKey][$key])
942  ) {
943  // Alternative language translation for key exists
944  $word = $this->LOCAL_LANG[$languageKey][$key][0]['target'];
945  break;
946  }
947  }
948  }
949  if ($word === null) {
950  if (!empty($this->LOCAL_LANG['default'][$key][0]['target'])
951  || isset($this->LOCAL_LANG_UNSET['default'][$key])
952  ) {
953  // Get default translation (without charset conversion, english)
954  $word = $this->LOCAL_LANG['default'][$key][0]['target'];
955  } else {
956  // Return alternative string or empty
957  $word = isset($this->LLtestPrefixAlt) ? $this->LLtestPrefixAlt . $alternativeLabel : $alternativeLabel;
958  }
959  }
960  return isset($this->LLtestPrefix) ? $this->LLtestPrefix . $word : $word;
961  }
962 
973  public function ‪pi_loadLL($languageFilePath = '')
974  {
975  if ($this->LOCAL_LANG_loaded) {
976  return;
977  }
978 
979  if ($languageFilePath === '' && $this->scriptRelPath) {
980  $languageFilePath = 'EXT:' . $this->extKey . '/' . ‪PathUtility::dirname($this->scriptRelPath) . '/locallang.xlf';
981  }
982  if ($languageFilePath !== '') {
984  $languageFactory = GeneralUtility::makeInstance(LocalizationFactory::class);
985  $this->LOCAL_LANG = $languageFactory->getParsedData($languageFilePath, $this->LLkey);
986  $alternativeLanguageKeys = ‪GeneralUtility::trimExplode(',', $this->altLLkey, true);
987  foreach ($alternativeLanguageKeys as $languageKey) {
988  $tempLL = $languageFactory->getParsedData($languageFilePath, $languageKey);
989  if ($this->LLkey !== 'default' && isset($tempLL[$languageKey])) {
990  $this->LOCAL_LANG[$languageKey] = $tempLL[$languageKey];
991  }
992  }
993  // Overlaying labels from TypoScript (including fictitious language keys for non-system languages!):
994  if (isset($this->conf['_LOCAL_LANG.'])) {
995  // Clear the "unset memory"
996  $this->LOCAL_LANG_UNSET = [];
997  foreach ($this->conf['_LOCAL_LANG.'] as $languageKey => $languageArray) {
998  // Remove the dot after the language key
999  $languageKey = substr($languageKey, 0, -1);
1000  // Don't process label if the language is not loaded
1001  if (is_array($languageArray) && isset($this->LOCAL_LANG[$languageKey])) {
1002  foreach ($languageArray as $labelKey => $labelValue) {
1003  if (!is_array($labelValue)) {
1004  $this->LOCAL_LANG[$languageKey][$labelKey][0]['target'] = $labelValue;
1005  if ($labelValue === '') {
1006  $this->LOCAL_LANG_UNSET[$languageKey][$labelKey] = '';
1007  }
1008  }
1009  }
1010  }
1011  }
1012  }
1013  }
1014  $this->LOCAL_LANG_loaded = true;
1015  }
1016 
1017  /***************************
1018  *
1019  * Database, queries
1020  *
1021  **************************/
1036  public function ‪pi_exec_query($table, $count = false, $addWhere = '', $mm_cat = '', $groupBy = '', $orderBy = '', $query = '')
1037  {
1038  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
1039  $queryBuilder->from($table);
1040 
1041  // Begin Query:
1042  if (!$query) {
1043  // This adds WHERE-clauses that ensures deleted, hidden, starttime/endtime/access records are NOT
1044  // selected, if they should not! Almost ALWAYS add this to your queries!
1045  $queryBuilder->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));
1046 
1047  // Fetches the list of PIDs to select from.
1048  // TypoScript property .pidList is a comma list of pids. If blank, current page id is used.
1049  // TypoScript property .recursive is an int+ which determines how many levels down from the pids in the pid-list subpages should be included in the select.
1050  $pidList = ‪GeneralUtility::intExplode(',', $this->‪pi_getPidList($this->conf['pidList'], $this->conf['recursive']), true);
1051  if (is_array($mm_cat)) {
1052  $queryBuilder->from($mm_cat['table'])
1053  ->from($mm_cat['mmtable'])
1054  ->where(
1055  $queryBuilder->expr()->eq($table . '.uid', $queryBuilder->quoteIdentifier($mm_cat['mmtable'] . '.uid_local')),
1056  $queryBuilder->expr()->eq($mm_cat['table'] . '.uid', $queryBuilder->quoteIdentifier($mm_cat['mmtable'] . '.uid_foreign')),
1057  $queryBuilder->expr()->in(
1058  $table . '.pid',
1059  $queryBuilder->createNamedParameter($pidList, Connection::PARAM_INT_ARRAY)
1060  )
1061  );
1062  if (strcmp($mm_cat['catUidList'], '')) {
1063  $queryBuilder->andWhere(
1064  $queryBuilder->expr()->in(
1065  $mm_cat['table'] . '.uid',
1066  $queryBuilder->createNamedParameter(
1067  ‪GeneralUtility::intExplode(',', $mm_cat['catUidList'], true),
1068  Connection::PARAM_INT_ARRAY
1069  )
1070  )
1071  );
1072  }
1073  } else {
1074  $queryBuilder->where(
1075  $queryBuilder->expr()->in(
1076  'pid',
1077  $queryBuilder->createNamedParameter($pidList, Connection::PARAM_INT_ARRAY)
1078  )
1079  );
1080  }
1081  } else {
1082  // Restrictions need to be handled by the $query parameter!
1083  $queryBuilder->getRestrictions()->removeAll();
1084 
1085  // Split the "FROM ... WHERE" string so we get the WHERE part and TABLE names separated...:
1086  [$tableListFragment, $whereFragment] = preg_split('/WHERE/i', trim($query), 2);
1087  foreach (‪QueryHelper::parseTableList($tableListFragment) as $tableNameAndAlias) {
1088  [$tableName, $tableAlias] = $tableNameAndAlias;
1089  $queryBuilder->from($tableName, $tableAlias);
1090  }
1091  $queryBuilder->where(‪QueryHelper::stripLogicalOperatorPrefix($whereFragment));
1092  }
1093 
1094  // Add '$addWhere'
1095  if ($addWhere) {
1096  $queryBuilder->andWhere(‪QueryHelper::stripLogicalOperatorPrefix($addWhere));
1097  }
1098  // Search word:
1099  if ($this->piVars['sword'] && $this->internal['searchFieldList']) {
1101  $this->cObj->searchWhere($this->piVars['sword'], $this->internal['searchFieldList'], $table)
1102  );
1103  if (!empty($searchWhere)) {
1104  $queryBuilder->andWhere($searchWhere);
1105  }
1106  }
1107 
1108  if ($count) {
1109  $queryBuilder->count('*');
1110  } else {
1111  // Add 'SELECT'
1112  ‪$fields = $this->‪pi_prependFieldsWithTable($table, $this->pi_listFields);
1113  $queryBuilder->select(...‪GeneralUtility::trimExplode(',', ‪$fields, true));
1114 
1115  // Order by data:
1116  if (!$orderBy && $this->internal['orderBy']) {
1117  if (GeneralUtility::inList($this->internal['orderByList'], $this->internal['orderBy'])) {
1118  $sorting = $this->internal['descFlag'] ? ' DESC' : 'ASC';
1119  $queryBuilder->orderBy($table . '.' . $this->internal['orderBy'], $sorting);
1120  }
1121  } elseif ($orderBy) {
1122  foreach (‪QueryHelper::parseOrderBy($orderBy) as $fieldNameAndSorting) {
1123  [$fieldName, $sorting] = $fieldNameAndSorting;
1124  $queryBuilder->addOrderBy($fieldName, $sorting);
1125  }
1126  }
1128  // Limit data:
1129  $pointer = (int)$this->piVars['pointer'];
1130  $results_at_a_time = ‪MathUtility::forceIntegerInRange($this->internal['results_at_a_time'], 1, 1000);
1131  $queryBuilder->setFirstResult($pointer * $results_at_a_time)
1132  ->setMaxResults($results_at_a_time);
1133 
1134  // Grouping
1135  if (!empty($groupBy)) {
1136  $queryBuilder->groupBy(...‪QueryHelper::parseGroupBy($groupBy));
1137  }
1138  }
1140  return $queryBuilder->execute();
1141  }
1142 
1152  public function ‪pi_getRecord($table, $uid, $checkPage = false)
1153  {
1154  return $this->frontendController->sys_page->checkRecord($table, $uid, $checkPage);
1155  }
1156 
1164  public function ‪pi_getPidList($pid_list, $recursive = 0)
1165  {
1166  if (!strcmp($pid_list, '')) {
1167  $pid_list = $this->frontendController->id;
1168  }
1169  $recursive = ‪MathUtility::forceIntegerInRange($recursive, 0);
1170  $pid_list_arr = array_unique(‪GeneralUtility::intExplode(',', $pid_list, true));
1171  $pid_list = [];
1172  foreach ($pid_list_arr as $val) {
1173  $val = ‪MathUtility::forceIntegerInRange($val, 0);
1174  if ($val) {
1175  $_list = $this->cObj->getTreeList(-1 * $val, $recursive);
1176  if ($_list) {
1177  $pid_list[] = $_list;
1178  }
1179  }
1180  }
1181  return implode(',', $pid_list);
1182  }
1183 
1191  public function ‪pi_prependFieldsWithTable($table, $fieldList)
1192  {
1193  $list = ‪GeneralUtility::trimExplode(',', $fieldList, true);
1194  $return = [];
1195  foreach ($list as $listItem) {
1196  $return[] = $table . '.' . $listItem;
1197  }
1198  return implode(',', $return);
1199  }
1200 
1212  public function ‪pi_getCategoryTableContents($table, $pid, $whereClause = '', $groupBy = '', $orderBy = '', $limit = '')
1213  {
1214  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
1215  $queryBuilder->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));
1216  $queryBuilder->select('*')
1217  ->from($table)
1218  ->where(
1219  $queryBuilder->expr()->eq(
1220  'pid',
1221  $queryBuilder->createNamedParameter($pid, \PDO::PARAM_INT)
1222  ),
1224  );
1225 
1226  if (!empty($orderBy)) {
1227  foreach (‪QueryHelper::parseOrderBy($orderBy) as $fieldNameAndSorting) {
1228  [$fieldName, $sorting] = $fieldNameAndSorting;
1229  $queryBuilder->addOrderBy($fieldName, $sorting);
1230  }
1231  }
1232 
1233  if (!empty($groupBy)) {
1234  $queryBuilder->groupBy(...‪QueryHelper::parseGroupBy($groupBy));
1235  }
1236 
1237  if (!empty($limit)) {
1238  $limitValues = ‪GeneralUtility::intExplode(',', $limit, true);
1239  if (count($limitValues) === 1) {
1240  $queryBuilder->setMaxResults($limitValues[0]);
1241  } else {
1242  $queryBuilder->setFirstResult($limitValues[0])
1243  ->setMaxResults($limitValues[1]);
1244  }
1245  }
1246 
1247  $result = $queryBuilder->execute();
1248  $outArr = [];
1249  while ($row = $result->fetch()) {
1250  $outArr[$row['uid']] = $row;
1251  }
1252  return $outArr;
1253  }
1254 
1255  /***************************
1256  *
1257  * Various
1258  *
1259  **************************/
1268  public function ‪pi_isOnlyFields($fList, $lowerThan = -1)
1269  {
1270  $lowerThan = $lowerThan == -1 ? $this->pi_lowerThan : $lowerThan;
1271  $fList = ‪GeneralUtility::trimExplode(',', $fList, true);
1272  $tempPiVars = ‪$this->piVars;
1273  foreach ($fList as $k) {
1274  if (!‪MathUtility::canBeInterpretedAsInteger($tempPiVars[$k]) || $tempPiVars[$k] < $lowerThan) {
1275  unset($tempPiVars[$k]);
1276  }
1277  }
1278  if (empty($tempPiVars)) {
1279  // @TODO: How do we deal with this? return TRUE would be the right thing to do here but that might be breaking
1280  return 1;
1281  }
1282  return null;
1283  }
1284 
1294  public function ‪pi_autoCache($inArray)
1295  {
1296  if (is_array($inArray)) {
1297  foreach ($inArray as $fN => $fV) {
1298  if (!strcmp($inArray[$fN], '')) {
1299  unset($inArray[$fN]);
1300  } elseif (is_array($this->pi_autoCacheFields[$fN])) {
1301  if (is_array($this->pi_autoCacheFields[$fN]['range']) && (int)$inArray[$fN] >= (int)$this->pi_autoCacheFields[$fN]['range'][0] && (int)$inArray[$fN] <= (int)$this->pi_autoCacheFields[$fN]['range'][1]) {
1302  unset($inArray[$fN]);
1303  }
1304  if (is_array($this->pi_autoCacheFields[$fN]['list']) && in_array($inArray[$fN], $this->pi_autoCacheFields[$fN]['list'])) {
1305  unset($inArray[$fN]);
1306  }
1307  }
1308  }
1309  }
1310  if (empty($inArray)) {
1311  // @TODO: How do we deal with this? return TRUE would be the right thing to do here but that might be breaking
1312  return 1;
1313  }
1314  return null;
1315  }
1325  public function ‪pi_RTEcssText($str)
1326  {
1327  $str = $this->cObj->parseFunc($str, [], '< lib.parseFunc_RTE');
1328  return $str;
1329  }
1330 
1331  /*******************************
1332  *
1333  * FlexForms related functions
1334  *
1335  *******************************/
1341  public function ‪pi_initPIflexForm($field = 'pi_flexform')
1342  {
1343  // Converting flexform data into array:
1344  if (!is_array($this->cObj->data[$field]) && $this->cObj->data[$field]) {
1345  $this->cObj->data[$field] = ‪GeneralUtility::xml2array($this->cObj->data[$field]);
1346  if (!is_array($this->cObj->data[$field])) {
1347  $this->cObj->data[$field] = [];
1348  }
1349  }
1350  }
1351 
1362  public function ‪pi_getFFvalue($T3FlexForm_array, $fieldName, $sheet = 'sDEF', $lang = 'lDEF', $value = 'vDEF')
1363  {
1364  $sheetArray = is_array($T3FlexForm_array) ? $T3FlexForm_array['data'][$sheet][$lang] : '';
1365  if (is_array($sheetArray)) {
1366  return $this->‪pi_getFFvalueFromSheetArray($sheetArray, explode('/', $fieldName), $value);
1367  }
1368  return null;
1369  }
1370 
1381  public function ‪pi_getFFvalueFromSheetArray($sheetArray, $fieldNameArr, $value)
1382  {
1383  $tempArr = $sheetArray;
1384  foreach ($fieldNameArr as $k => $v) {
1386  if (is_array($tempArr)) {
1387  $c = 0;
1388  foreach ($tempArr as $values) {
1389  if ($c == $v) {
1390  $tempArr = $values;
1391  break;
1392  }
1393  $c++;
1394  }
1395  }
1396  } else {
1397  $tempArr = $tempArr[$v];
1398  }
1399  }
1400  return $tempArr[$value];
1401  }
1402 }
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$templateService
‪MarkerBasedTemplateService $templateService
Definition: AbstractPlugin.php:194
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$altLLkey
‪string $altLLkey
Definition: AbstractPlugin.php:123
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\applyStdWrapRecursive
‪array applyStdWrapRecursive(array $conf, $level=0)
Definition: AbstractPlugin.php:231
‪TYPO3\CMS\Core\Database\Query\QueryHelper\parseOrderBy
‪static array array[] parseOrderBy(string $input)
Definition: QueryHelper.php:44
‪TYPO3\CMS\Core\Utility\GeneralUtility\xml2array
‪static mixed xml2array($string, $NSprefix='', $reportDocTag=false)
Definition: GeneralUtility.php:1531
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_linkToPage
‪string pi_linkToPage($str, $id, $target='', $urlParameters=[])
Definition: AbstractPlugin.php:331
‪TYPO3\CMS\Core\Utility\PathUtility
Definition: PathUtility.php:24
‪TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger
‪static bool canBeInterpretedAsInteger($var)
Definition: MathUtility.php:74
‪TYPO3\CMS\Core\Database\Query\QueryHelper\parseTableList
‪static array array[] parseTableList(string $input)
Definition: QueryHelper.php:72
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_list_header
‪string pi_list_header()
Definition: AbstractPlugin.php:745
‪TYPO3\CMS\Core\Utility\PathUtility\dirname
‪static string dirname($path)
Definition: PathUtility.php:186
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_list_modeSelector
‪string pi_list_modeSelector($items=[], $tableParams='')
Definition: AbstractPlugin.php:664
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getPidList
‪string pi_getPidList($pid_list, $recursive=0)
Definition: AbstractPlugin.php:1139
‪TYPO3\CMS\Core\Localization\LocalizationFactory
Definition: LocalizationFactory.php:28
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_list_makelist
‪string pi_list_makelist($statement, $tableParams='')
Definition: AbstractPlugin.php:699
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getClassName
‪string pi_getClassName($class)
Definition: AbstractPlugin.php:761
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getLL
‪string pi_getLL($key, $alternativeLabel='')
Definition: AbstractPlugin.php:904
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_initPIflexForm
‪pi_initPIflexForm($field='pi_flexform')
Definition: AbstractPlugin.php:1316
‪TYPO3\CMS\Core\Database\Query\QueryHelper\parseGroupBy
‪static array string[] parseGroupBy(string $input)
Definition: QueryHelper.php:102
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$scriptRelPath
‪string $scriptRelPath
Definition: AbstractPlugin.php:59
‪TYPO3\CMS\Core\Utility\MathUtility\forceIntegerInRange
‪static int forceIntegerInRange($theInt, $min, $max=2000000000, $defaultValue=0)
Definition: MathUtility.php:32
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_prependFieldsWithTable
‪string pi_prependFieldsWithTable($table, $fieldList)
Definition: AbstractPlugin.php:1166
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin
Definition: AbstractPlugin.php:42
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$conf
‪array $conf
Definition: AbstractPlugin.php:174
‪TYPO3\CMS\Core\Localization\Locales
Definition: Locales.php:30
‪TYPO3\CMS\Core\Utility\ArrayUtility\mergeRecursiveWithOverrule
‪static mergeRecursiveWithOverrule(array &$original, array $overrule, $addKeys=true, $includeEmptyValues=true, $enableUnsetFeature=true)
Definition: ArrayUtility.php:654
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$pi_autoCacheEn
‪bool $pi_autoCacheEn
Definition: AbstractPlugin.php:165
‪TYPO3\CMS\Frontend\Plugin
Definition: AbstractPlugin.php:16
‪$fields
‪$fields
Definition: pages.php:5
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$LOCAL_LANG_UNSET
‪array $LOCAL_LANG_UNSET
Definition: AbstractPlugin.php:104
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$pi_moreParams
‪string $pi_moreParams
Definition: AbstractPlugin.php:153
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getCategoryTableContents
‪array pi_getCategoryTableContents($table, $pid, $whereClause='', $groupBy='', $orderBy='', $limit='')
Definition: AbstractPlugin.php:1187
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_linkTP
‪string pi_linkTP($str, $urlParameters=[], $cache=false, $altPageId=0)
Definition: AbstractPlugin.php:348
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$extKey
‪string $extKey
Definition: AbstractPlugin.php:65
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getFFvalueFromSheetArray
‪mixed pi_getFFvalueFromSheetArray($sheetArray, $fieldNameArr, $value)
Definition: AbstractPlugin.php:1356
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_openAtagHrefInJSwindow
‪string pi_openAtagHrefInJSwindow($str, $winName='', $winParams='width=670, height=500, status=0, menubar=0, scrollbars=1, resizable=1')
Definition: AbstractPlugin.php:445
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$piVars
‪array $piVars
Definition: AbstractPlugin.php:73
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$prefixId
‪string $prefixId
Definition: AbstractPlugin.php:53
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$pi_tmpPageId
‪int $pi_tmpPageId
Definition: AbstractPlugin.php:184
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$internal
‪array $internal
Definition: AbstractPlugin.php:89
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_wrapInBaseClass
‪string pi_wrapInBaseClass($str)
Definition: AbstractPlugin.php:796
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getPageLink
‪string pi_getPageLink($id, $target='', $urlParameters=[])
Definition: AbstractPlugin.php:313
‪TYPO3\CMS\Core\Database\Query\QueryHelper
Definition: QueryHelper.php:32
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_setPiVarDefaults
‪pi_setPiVarDefaults()
Definition: AbstractPlugin.php:262
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getEditIcon
‪string pi_getEditIcon($content, $fields, $title='', $row=[], $tablename='', $oConf=[])
Definition: AbstractPlugin.php:875
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$pi_isOnlyFields
‪string $pi_isOnlyFields
Definition: AbstractPlugin.php:141
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$pi_alwaysPrev
‪int $pi_alwaysPrev
Definition: AbstractPlugin.php:145
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\__construct
‪__construct($_=null, TypoScriptFrontendController $frontendController=null)
Definition: AbstractPlugin.php:204
‪TYPO3\CMS\Core\Utility\HttpUtility\buildQueryString
‪static string buildQueryString(array $parameters, string $prependCharacter='', bool $skipEmptyParameters=false)
Definition: HttpUtility.php:163
‪$locales
‪$locales
Definition: be_users.php:7
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getFFvalue
‪string null pi_getFFvalue($T3FlexForm_array, $fieldName, $sheet='sDEF', $lang='lDEF', $value='vDEF')
Definition: AbstractPlugin.php:1337
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$cObj
‪ContentObjectRenderer null $cObj
Definition: AbstractPlugin.php:47
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_autoCache
‪bool null pi_autoCache($inArray)
Definition: AbstractPlugin.php:1269
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$pi_listFields
‪string $pi_listFields
Definition: AbstractPlugin.php:157
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_exec_query
‪Statement pi_exec_query($table, $count=false, $addWhere='', $mm_cat='', $groupBy='', $orderBy='', $query='')
Definition: AbstractPlugin.php:1011
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_linkTP_keepPIvars
‪string pi_linkTP_keepPIvars($str, $overrulePIvars=[], $cache=false, $clearAnyway=false, $altPageId=0)
Definition: AbstractPlugin.php:372
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$pi_lowerThan
‪int $pi_lowerThan
Definition: AbstractPlugin.php:149
‪TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode
‪static string[] trimExplode($delim, $string, $removeEmptyValues=false, $limit=0)
Definition: GeneralUtility.php:1059
‪TYPO3\CMS\Core\TypoScript\TypoScriptService
Definition: TypoScriptService.php:25
‪$output
‪$output
Definition: annotationChecker.php:119
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_linkTP_keepPIvars_url
‪string pi_linkTP_keepPIvars_url($overrulePIvars=[], $cache=false, $clearAnyway=false, $altPageId=0)
Definition: AbstractPlugin.php:397
‪TYPO3\CMS\Core\Database\Connection
Definition: Connection.php:36
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$pi_EPtemp_cObj
‪ContentObjectRenderer $pi_EPtemp_cObj
Definition: AbstractPlugin.php:180
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_isOnlyFields
‪bool null pi_isOnlyFields($fList, $lowerThan=-1)
Definition: AbstractPlugin.php:1243
‪TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
Definition: TypoScriptFrontendController.php:98
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_RTEcssText
‪string pi_RTEcssText($str)
Definition: AbstractPlugin.php:1300
‪TYPO3\CMS\Core\Database\Query\QueryHelper\stripLogicalOperatorPrefix
‪static string stripLogicalOperatorPrefix(string $constraint)
Definition: QueryHelper.php:165
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_loadLL
‪pi_loadLL($languageFilePath='')
Definition: AbstractPlugin.php:948
‪TYPO3\CMS\Core\Utility\ArrayUtility
Definition: ArrayUtility.php:24
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_classParam
‪string pi_classParam($class, $addClasses='')
Definition: AbstractPlugin.php:775
‪TYPO3\CMS\Core\Utility\GeneralUtility\intExplode
‪static int[] intExplode($delimiter, $string, $removeEmptyValues=false, $limit=0)
Definition: GeneralUtility.php:988
‪TYPO3\CMS\Core\Utility\MathUtility
Definition: MathUtility.php:22
‪TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
Definition: ContentObjectRenderer.php:97
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$LOCAL_LANG_loaded
‪bool $LOCAL_LANG_loaded
Definition: AbstractPlugin.php:111
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$LLtestPrefixAlt
‪string $LLtestPrefixAlt
Definition: AbstractPlugin.php:137
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_list_row
‪string pi_list_row($c)
Definition: AbstractPlugin.php:732
‪TYPO3\CMS\Core\Utility\HttpUtility
Definition: HttpUtility.php:24
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$LOCAL_LANG
‪array $LOCAL_LANG
Definition: AbstractPlugin.php:95
‪TYPO3\CMS\Core\Database\ConnectionPool
Definition: ConnectionPool.php:46
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getRecord
‪array pi_getRecord($table, $uid, $checkPage=false)
Definition: AbstractPlugin.php:1127
‪TYPO3\CMS\Core\Service\MarkerBasedTemplateService
Definition: MarkerBasedTemplateService.php:27
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$LLkey
‪string $LLkey
Definition: AbstractPlugin.php:117
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$LLtestPrefix
‪string $LLtestPrefix
Definition: AbstractPlugin.php:130
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_list_browseresults
‪string pi_list_browseresults($showResultCount=1, $tableParams='', $wrapArr=[], $pointerName='pointer', $hscText=true, $forceOutput=false)
Definition: AbstractPlugin.php:489
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\removeInternalNodeValue
‪array removeInternalNodeValue(array $typoscript)
Definition: AbstractPlugin.php:280
‪TYPO3\CMS\Core\Database\Query\Restriction\FrontendRestrictionContainer
Definition: FrontendRestrictionContainer.php:31
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$pi_autoCacheFields
‪array $pi_autoCacheFields
Definition: AbstractPlugin.php:161
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getEditPanel
‪string pi_getEditPanel($row=[], $tablename='', $label='', $conf=[])
Definition: AbstractPlugin.php:834
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$frontendController
‪TypoScriptFrontendController $frontendController
Definition: AbstractPlugin.php:190
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_list_linkSingle
‪string pi_list_linkSingle($str, $uid, $cache=false, $mergeArr=[], $urlOnly=false, $altPageId=0)
Definition: AbstractPlugin.php:417