‪TYPO3CMS  9.5
AbstractPlugin.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
17 use Doctrine\DBAL\Driver\Statement;
18 use Psr\Http\Message\ServerRequestInterface;
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 
194  public ‪$pi_USER_INT_obj = false;
195 
202  public ‪$pi_checkCHash = false;
203 
212  public ‪$conf = [];
213 
220 
224  public ‪$pi_tmpPageId = 0;
225 
231  protected ‪$frontendController;
232 
236  protected ‪$templateService;
237 
247  {
248  $this->frontendController = ‪$frontendController ?: ‪$GLOBALS['TSFE'];
249  $this->templateService = GeneralUtility::makeInstance(MarkerBasedTemplateService::class);
250  // Setting piVars:
251  if ($this->prefixId) {
252  $this->piVars = GeneralUtility::_GPmerged($this->prefixId);
253  // cHash mode check
254  // IMPORTANT FOR CACHED PLUGINS (USER cObject): As soon as you generate cached plugin output which
255  // depends on parameters (eg. seeing the details of a news item) you MUST check if a cHash value is set.
256  // Background: The function call will check if a cHash parameter was sent with the URL because only if
257  // it was the page may be cached. If no cHash was found the function will simply disable caching to
258  // avoid unpredictable caching behaviour. In any case your plugin can generate the expected output and
259  // the only risk is that the content may not be cached. A missing cHash value is considered a mistake
260  // in the URL resulting from either URL manipulation, "realurl" "grayzones" etc. The problem is rare
261  // (more frequent with "realurl") but when it occurs it is very puzzling!
262  if ($this->pi_checkCHash && !empty($this->piVars)) {
263  $this->frontendController->reqCHash();
264  }
265  }
266  $siteLanguage = $this->‪getCurrentSiteLanguage();
267  if ($siteLanguage) {
268  $this->LLkey = $siteLanguage->getTypo3Language();
269  } elseif (!empty($this->frontendController->config['config']['language'])) {
270  $this->LLkey = $this->frontendController->config['config']['language'];
271  }
272 
273  if (empty($this->frontendController->config['config']['language_alt'])) {
275  ‪$locales = GeneralUtility::makeInstance(Locales::class);
276  if (in_array($this->LLkey, ‪$locales->getLocales())) {
277  $this->altLLkey = '';
278  foreach (‪$locales->getLocaleDependencies($this->LLkey) as $language) {
279  $this->altLLkey .= $language . ',';
280  }
281  $this->altLLkey = rtrim($this->altLLkey, ',');
282  }
283  } else {
284  $this->altLLkey = $this->frontendController->config['config']['language_alt'];
285  }
286  }
287 
295  protected function ‪applyStdWrapRecursive(array ‪$conf, $level = 0)
296  {
297  foreach (‪$conf as $key => $confNextLevel) {
298  if (strpos($key, '.') !== false) {
299  $key = substr($key, 0, -1);
300 
301  // descend into all non-stdWrap-subelements first
302  foreach ($confNextLevel as $subKey => $subConfNextLevel) {
303  if (is_array($subConfNextLevel) && strpos($subKey, '.') !== false && $subKey !== 'stdWrap.') {
304  ‪$conf[$key . '.'] = $this->‪applyStdWrapRecursive($confNextLevel, $level + 1);
305  }
306  }
307 
308  // now for stdWrap
309  foreach ($confNextLevel as $subKey => $subConfNextLevel) {
310  if (is_array($subConfNextLevel) && $subKey === 'stdWrap.') {
311  ‪$conf[$key] = $this->cObj->stdWrap(‪$conf[$key] ?? '', ‪$conf[$key . '.']['stdWrap.'] ?? []);
312  unset(‪$conf[$key . '.']['stdWrap.']);
313  if (empty(‪$conf[$key . '.'])) {
314  unset(‪$conf[$key . '.']);
315  }
316  }
317  }
318  }
319  }
320  return ‪$conf;
321  }
322 
326  public function ‪pi_setPiVarDefaults()
327  {
328  if (isset($this->conf['_DEFAULT_PI_VARS.']) && is_array($this->conf['_DEFAULT_PI_VARS.'])) {
329  $this->conf['_DEFAULT_PI_VARS.'] = $this->‪applyStdWrapRecursive($this->conf['_DEFAULT_PI_VARS.']);
330  $tmp = $this->conf['_DEFAULT_PI_VARS.'];
331  ‪ArrayUtility::mergeRecursiveWithOverrule($tmp, is_array($this->piVars) ? $this->piVars : []);
332  $this->piVars = $tmp;
333  }
334  }
335 
336  /***************************
337  *
338  * Link functions
339  *
340  **************************/
355  public function ‪pi_getPageLink($id, $target = '', $urlParameters = [])
356  {
357  return $this->cObj->getTypoLink_URL($id, $urlParameters, $target);
358  }
359 
372  public function ‪pi_linkToPage($str, $id, $target = '', $urlParameters = [])
373  {
374  return $this->cObj->getTypoLink($str, $id, $urlParameters, $target);
375  }
376 
388  public function ‪pi_linkTP($str, $urlParameters = [], $cache = false, $altPageId = 0)
389  {
390  ‪$conf = [];
391  ‪$conf['useCacheHash'] = $this->pi_USER_INT_obj ? 0 : $cache;
392  ‪$conf['no_cache'] = $this->pi_USER_INT_obj ? 0 : !$cache;
393  ‪$conf['parameter'] = $altPageId ? $altPageId : ($this->pi_tmpPageId ? $this->pi_tmpPageId : $this->frontendController->id);
394  ‪$conf['additionalParams'] = $this->conf['parent.']['addParams'] . ‪HttpUtility::buildQueryString($urlParameters, '&', true) . ‪$this->pi_moreParams;
395  return $this->cObj->typoLink($str, ‪$conf);
396  }
397 
411  public function ‪pi_linkTP_keepPIvars($str, $overrulePIvars = [], $cache = false, $clearAnyway = false, $altPageId = 0)
412  {
413  if (is_array($this->piVars) && is_array($overrulePIvars) && !$clearAnyway) {
415  unset(‪$piVars['DATA']);
417  $overrulePIvars = ‪$piVars;
418  if ($this->pi_autoCacheEn) {
419  $cache = $this->‪pi_autoCache($overrulePIvars);
420  }
421  }
422  return $this->‪pi_linkTP($str, [$this->prefixId => $overrulePIvars], $cache, $altPageId);
423  }
424 
436  public function ‪pi_linkTP_keepPIvars_url($overrulePIvars = [], $cache = false, $clearAnyway = false, $altPageId = 0)
437  {
438  $this->‪pi_linkTP_keepPIvars('|', $overrulePIvars, $cache, $clearAnyway, $altPageId);
439  return $this->cObj->lastTypoLinkUrl;
440  }
441 
455  public function ‪pi_list_linkSingle($str, $uid, $cache = false, $mergeArr = [], $urlOnly = false, $altPageId = 0)
456  {
457  if ($this->prefixId) {
458  if ($cache) {
459  $overrulePIvars = $uid ? ['showUid' => $uid] : [];
460  $overrulePIvars = array_merge($overrulePIvars, (array)$mergeArr);
461  $str = $this->‪pi_linkTP($str, [$this->prefixId => $overrulePIvars], $cache, $altPageId);
462  } else {
463  $overrulePIvars = ['showUid' => $uid ?: ''];
464  $overrulePIvars = array_merge($overrulePIvars, (array)$mergeArr);
465  $str = $this->‪pi_linkTP_keepPIvars($str, $overrulePIvars, $cache, 0, $altPageId);
466  }
467  // If urlOnly flag, return only URL as it has recently be generated.
468  if ($urlOnly) {
469  $str = $this->cObj->lastTypoLinkUrl;
470  }
471  }
472  return $str;
473  }
474 
483  public function ‪pi_openAtagHrefInJSwindow($str, $winName = '', $winParams = 'width=670,height=500,status=0,menubar=0,scrollbars=1,resizable=1')
484  {
485  if (preg_match('/(.*)(<a[^>]*>)(.*)/i', $str, $match)) {
486  // decode HTML entities, `href` is used in escaped JavaScript context
487  $aTagContent = GeneralUtility::get_tag_attributes($match[2], true);
488  $onClick = 'vHWin=window.open('
489  . GeneralUtility::quoteJSvalue($this->frontendController->baseUrlWrap($aTagContent['href'])) . ','
490  . GeneralUtility::quoteJSvalue($winName ?: md5($aTagContent['href'])) . ','
491  . GeneralUtility::quoteJSvalue($winParams) . ');vHWin.focus();return false;';
492  $match[2] = '<a href="#" onclick="' . htmlspecialchars($onClick) . '">';
493  $str = $match[1] . $match[2] . $match[3];
494  }
495  return $str;
496  }
497 
498  /***************************
499  *
500  * Functions for listing, browsing, searching etc.
501  *
502  **************************/
527  public function ‪pi_list_browseresults($showResultCount = 1, $tableParams = '', $wrapArr = [], $pointerName = 'pointer', $hscText = true, $forceOutput = false)
528  {
529  foreach (‪$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['pi_list_browseresults'] ?? [] as $classRef) {
530  $hookObj = GeneralUtility::makeInstance($classRef);
531  if (method_exists($hookObj, 'pi_list_browseresults')) {
532  $pageBrowser = $hookObj->pi_list_browseresults($showResultCount, $tableParams, $wrapArr, $pointerName, $hscText, $forceOutput, $this);
533  if (is_string($pageBrowser) && trim($pageBrowser) !== '') {
534  return $pageBrowser;
535  }
536  }
537  }
538  // example $wrapArr-array how it could be traversed from an extension
539  /* $wrapArr = array(
540  'browseBoxWrap' => '<div class="browseBoxWrap">|</div>',
541  'showResultsWrap' => '<div class="showResultsWrap">|</div>',
542  'browseLinksWrap' => '<div class="browseLinksWrap">|</div>',
543  'showResultsNumbersWrap' => '<span class="showResultsNumbersWrap">|</span>',
544  'disabledLinkWrap' => '<span class="disabledLinkWrap">|</span>',
545  'inactiveLinkWrap' => '<span class="inactiveLinkWrap">|</span>',
546  'activeLinkWrap' => '<span class="activeLinkWrap">|</span>'
547  );*/
548  // Initializing variables:
549  $pointer = (int)$this->piVars[$pointerName];
550  $count = (int)$this->internal['res_count'];
551  $results_at_a_time = ‪MathUtility::forceIntegerInRange($this->internal['results_at_a_time'], 1, 1000);
552  $totalPages = ceil($count / $results_at_a_time);
553  $maxPages = ‪MathUtility::forceIntegerInRange($this->internal['maxPages'], 1, 100);
555  if (!$forceOutput && $count <= $results_at_a_time) {
556  return '';
557  }
558  // $showResultCount determines how the results of the pagerowser will be shown.
559  // If set to 0: only the result-browser will be shown
560  // 1: (default) the text "Displaying results..." and the result-browser will be shown.
561  // 2: only the text "Displaying results..." will be shown
562  $showResultCount = (int)$showResultCount;
563  // If this is set, two links named "<< First" and "LAST >>" will be shown and point to the very first or last page.
564  $showFirstLast = !empty($this->internal['showFirstLast']);
565  // If this has a value the "previous" button is always visible (will be forced if "showFirstLast" is set)
566  $alwaysPrev = $showFirstLast ? 1 : ‪$this->pi_alwaysPrev;
567  if (isset($this->internal['pagefloat'])) {
568  if (strtoupper($this->internal['pagefloat']) === 'CENTER') {
569  $pagefloat = ceil(($maxPages - 1) / 2);
570  } else {
571  // pagefloat set as integer. 0 = left, value >= $this->internal['maxPages'] = right
572  $pagefloat = ‪MathUtility::forceIntegerInRange($this->internal['pagefloat'], -1, $maxPages - 1);
573  }
574  } else {
575  // pagefloat disabled
576  $pagefloat = -1;
577  }
578  // Default values for "traditional" wrapping with a table. Can be overwritten by vars from $wrapArr
579  $wrapper['disabledLinkWrap'] = '<td class="nowrap"><p>|</p></td>';
580  $wrapper['inactiveLinkWrap'] = '<td class="nowrap"><p>|</p></td>';
581  $wrapper['activeLinkWrap'] = '<td' . $this->‪pi_classParam('browsebox-SCell') . ' class="nowrap"><p>|</p></td>';
582  $wrapper['browseLinksWrap'] = rtrim('<table ' . $tableParams) . '><tr>|</tr></table>';
583  $wrapper['showResultsWrap'] = '<p>|</p>';
584  $wrapper['browseBoxWrap'] = '
585  <!--
586  List browsing box:
587  -->
588  <div ' . $this->‪pi_classParam('browsebox') . '>
589  |
590  </div>';
591  // Now overwrite all entries in $wrapper which are also in $wrapArr
592  $wrapper = array_merge($wrapper, $wrapArr);
593  // Show pagebrowser
594  if ($showResultCount != 2) {
595  if ($pagefloat > -1) {
596  $lastPage = min($totalPages, max($pointer + 1 + $pagefloat, $maxPages));
597  $firstPage = max(0, $lastPage - $maxPages);
598  } else {
599  $firstPage = 0;
600  $lastPage = ‪MathUtility::forceIntegerInRange($totalPages, 1, $maxPages);
601  }
602  $links = [];
603  // Make browse-table/links:
604  // Link to first page
605  if ($showFirstLast) {
606  if ($pointer > 0) {
607  $label = $this->‪pi_getLL('pi_list_browseresults_first', '<< First');
608  $links[] = $this->cObj->wrap($this->‪pi_linkTP_keepPIvars($hscText ? htmlspecialchars($label) : $label, [$pointerName => null], ‪$pi_isOnlyFields), $wrapper['inactiveLinkWrap']);
609  } else {
610  $label = $this->‪pi_getLL('pi_list_browseresults_first', '<< First');
611  $links[] = $this->cObj->wrap($hscText ? htmlspecialchars($label) : $label, $wrapper['disabledLinkWrap']);
612  }
613  }
614  // Link to previous page
615  if ($alwaysPrev >= 0) {
616  if ($pointer > 0) {
617  $label = $this->‪pi_getLL('pi_list_browseresults_prev', '< Previous');
618  $links[] = $this->cObj->wrap($this->‪pi_linkTP_keepPIvars($hscText ? htmlspecialchars($label) : $label, [$pointerName => ($pointer - 1) ?: ''], ‪$pi_isOnlyFields), $wrapper['inactiveLinkWrap']);
619  } elseif ($alwaysPrev) {
620  $label = $this->‪pi_getLL('pi_list_browseresults_prev', '< Previous');
621  $links[] = $this->cObj->wrap($hscText ? htmlspecialchars($label) : $label, $wrapper['disabledLinkWrap']);
622  }
623  }
624  // Links to pages
625  for ($a = $firstPage; $a < $lastPage; $a++) {
626  if ($this->internal['showRange']) {
627  $pageText = ($a * $results_at_a_time + 1) . '-' . min($count, ($a + 1) * $results_at_a_time);
628  } else {
629  $label = $this->‪pi_getLL('pi_list_browseresults_page', 'Page');
630  $pageText = trim(($hscText ? htmlspecialchars($label) : $label) . ' ' . ($a + 1));
631  }
632  // Current page
633  if ($pointer == $a) {
634  if ($this->internal['dontLinkActivePage']) {
635  $links[] = $this->cObj->wrap($pageText, $wrapper['activeLinkWrap']);
636  } else {
637  $links[] = $this->cObj->wrap($this->‪pi_linkTP_keepPIvars($pageText, [$pointerName => $a ?: ''], ‪$pi_isOnlyFields), $wrapper['activeLinkWrap']);
638  }
639  } else {
640  $links[] = $this->cObj->wrap($this->‪pi_linkTP_keepPIvars($pageText, [$pointerName => $a ?: ''], ‪$pi_isOnlyFields), $wrapper['inactiveLinkWrap']);
641  }
642  }
643  if ($pointer < $totalPages - 1 || $showFirstLast) {
644  // Link to next page
645  if ($pointer >= $totalPages - 1) {
646  $label = $this->‪pi_getLL('pi_list_browseresults_next', 'Next >');
647  $links[] = $this->cObj->wrap($hscText ? htmlspecialchars($label) : $label, $wrapper['disabledLinkWrap']);
648  } else {
649  $label = $this->‪pi_getLL('pi_list_browseresults_next', 'Next >');
650  $links[] = $this->cObj->wrap($this->‪pi_linkTP_keepPIvars($hscText ? htmlspecialchars($label) : $label, [$pointerName => $pointer + 1], ‪$pi_isOnlyFields), $wrapper['inactiveLinkWrap']);
651  }
652  }
653  // Link to last page
654  if ($showFirstLast) {
655  if ($pointer < $totalPages - 1) {
656  $label = $this->‪pi_getLL('pi_list_browseresults_last', 'Last >>');
657  $links[] = $this->cObj->wrap($this->‪pi_linkTP_keepPIvars($hscText ? htmlspecialchars($label) : $label, [$pointerName => $totalPages - 1], ‪$pi_isOnlyFields), $wrapper['inactiveLinkWrap']);
658  } else {
659  $label = $this->‪pi_getLL('pi_list_browseresults_last', 'Last >>');
660  $links[] = $this->cObj->wrap($hscText ? htmlspecialchars($label) : $label, $wrapper['disabledLinkWrap']);
661  }
662  }
663  $theLinks = $this->cObj->wrap(implode(LF, $links), $wrapper['browseLinksWrap']);
664  } else {
665  $theLinks = '';
666  }
667  $pR1 = $pointer * $results_at_a_time + 1;
668  $pR2 = $pointer * $results_at_a_time + $results_at_a_time;
669  if ($showResultCount) {
670  if ($wrapper['showResultsNumbersWrap']) {
671  // This will render the resultcount in a more flexible way using markers (new in TYPO3 3.8.0).
672  // The formatting string is expected to hold template markers (see function header). Example: 'Displaying results ###FROM### to ###TO### out of ###OUT_OF###'
673  $markerArray['###FROM###'] = $this->cObj->wrap($this->internal['res_count'] > 0 ? $pR1 : 0, $wrapper['showResultsNumbersWrap']);
674  $markerArray['###TO###'] = $this->cObj->wrap(min($this->internal['res_count'], $pR2), $wrapper['showResultsNumbersWrap']);
675  $markerArray['###OUT_OF###'] = $this->cObj->wrap($this->internal['res_count'], $wrapper['showResultsNumbersWrap']);
676  $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']);
677  $markerArray['###CURRENT_PAGE###'] = $this->cObj->wrap($pointer + 1, $wrapper['showResultsNumbersWrap']);
678  $markerArray['###TOTAL_PAGES###'] = $this->cObj->wrap($totalPages, $wrapper['showResultsNumbersWrap']);
679  // Substitute markers
680  $resultCountMsg = $this->templateService->substituteMarkerArray($this->‪pi_getLL('pi_list_browseresults_displays', 'Displaying results ###FROM### to ###TO### out of ###OUT_OF###'), $markerArray);
681  } else {
682  // Render the resultcount in the "traditional" way using sprintf
683  $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);
684  }
685  $resultCountMsg = $this->cObj->wrap($resultCountMsg, $wrapper['showResultsWrap']);
686  } else {
687  $resultCountMsg = '';
688  }
689  $sTables = $this->cObj->wrap($resultCountMsg . $theLinks, $wrapper['browseBoxWrap']);
690  return $sTables;
691  }
692 
700  public function ‪pi_list_modeSelector($items = [], $tableParams = '')
701  {
702  $cells = [];
703  foreach ($items as $k => $v) {
704  $cells[] = '
705  <td' . ($this->piVars['mode'] == $k ? $this->‪pi_classParam('modeSelector-SCell') : '') . '><p>' . $this->‪pi_linkTP_keepPIvars(htmlspecialchars($v), ['mode' => $k], $this->‪pi_isOnlyFields($this->‪pi_isOnlyFields)) . '</p></td>';
706  }
707  $sTables = '
708 
709  <!--
710  Mode selector (menu for list):
711  -->
712  <div' . $this->‪pi_classParam('modeSelector') . '>
713  <' . rtrim('table ' . $tableParams) . '>
714  <tr>
715  ' . implode('', $cells) . '
716  </tr>
717  </table>
718  </div>';
719  return $sTables;
720  }
721 
734  public function ‪pi_list_makelist($statement, $tableParams = '')
735  {
736  // Make list table header:
737  $tRows = [];
738  $this->internal['currentRow'] = '';
739  $tRows[] = $this->‪pi_list_header();
740  // Make list table rows
741  $c = 0;
742  while ($this->internal['currentRow'] = $statement->fetch()) {
743  $tRows[] = $this->‪pi_list_row($c);
744  $c++;
745  }
746  $out = '
747 
748  <!--
749  Record list:
750  -->
751  <div' . $this->‪pi_classParam('listrow') . '>
752  <' . rtrim('table ' . $tableParams) . '>
753  ' . implode('', $tRows) . '
754  </table>
755  </div>';
756  return $out;
757  }
758 
767  public function ‪pi_list_row($c)
768  {
769  // Dummy
770  return '<tr' . ($c % 2 ? $this->‪pi_classParam('listrow-odd') : '') . '><td><p>[dummy row]</p></td></tr>';
771  }
772 
780  public function ‪pi_list_header()
781  {
782  return '<tr' . $this->‪pi_classParam('listrow-header') . '><td><p>[dummy header row]</p></td></tr>';
783  }
784 
785  /***************************
786  *
787  * Stylesheet, CSS
788  *
789  **************************/
796  public function ‪pi_getClassName($class)
797  {
798  return str_replace('_', '-', $this->prefixId) . ($this->prefixId ? '-' : '') . $class;
799  }
800 
810  public function ‪pi_classParam($class, $addClasses = '')
811  {
812  ‪$output = '';
813  $classNames = GeneralUtility::trimExplode(',', $class);
814  foreach ($classNames as $className) {
815  ‪$output .= ' ' . $this->‪pi_getClassName($className);
816  }
817  $additionalClassNames = GeneralUtility::trimExplode(',', $addClasses);
818  foreach ($additionalClassNames as $additionalClassName) {
819  ‪$output .= ' ' . $additionalClassName;
820  }
821  return ' class="' . trim(‪$output) . '"';
822  }
823 
831  public function ‪pi_wrapInBaseClass($str)
832  {
833  $content = '<div class="' . str_replace('_', '-', $this->prefixId) . '">
834  ' . $str . '
835  </div>
836  ';
837  if (!$this->frontendController->config['config']['disablePrefixComment']) {
838  $content = '
839 
840 
841  <!--
842 
843  BEGIN: Content of extension "' . $this->extKey . '", plugin "' . $this->prefixId . '"
844 
845  -->
846  ' . $content . '
847  <!-- END: Content of extension "' . $this->extKey . '", plugin "' . $this->prefixId . '" -->
848 
849  ';
850  }
851  return $content;
852  }
853 
854  /***************************
855  *
856  * Frontend editing: Edit panel, edit icons
857  *
858  **************************/
869  public function ‪pi_getEditPanel($row = [], $tablename = '', $label = '', ‪$conf = [])
870  {
871  $panel = '';
872  if (!$row || !$tablename) {
873  $row = $this->internal['currentRow'];
874  $tablename = $this->internal['currentTable'];
875  }
876  if ($this->frontendController->isBackendUserLoggedIn()) {
877  // Create local cObj if not set:
878  if (!is_object($this->pi_EPtemp_cObj)) {
879  $this->pi_EPtemp_cObj = GeneralUtility::makeInstance(ContentObjectRenderer::class);
880  $this->pi_EPtemp_cObj->setParent($this->cObj->data, $this->cObj->currentRecord);
881  }
882  // Initialize the cObj object with current row
883  $this->pi_EPtemp_cObj->start($row, $tablename);
884  // Setting TypoScript values in the $conf array. See documentation in TSref for the EDITPANEL cObject.
885  ‪$conf['allow'] = 'edit,new,delete,move,hide';
886  $panel = $this->pi_EPtemp_cObj->cObjGetSingle('EDITPANEL', ‪$conf, 'editpanel');
887  }
888  if ($panel) {
889  if ($label) {
890  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 -->';
891  }
892  return '<!-- BEGIN: EDIT PANEL -->' . $panel . '<!-- END: EDIT PANEL -->';
893  }
894  return $label;
895  }
896 
910  public function ‪pi_getEditIcon($content, ‪$fields, $title = '', $row = [], $tablename = '', $oConf = [])
911  {
912  if ($this->frontendController->isBackendUserLoggedIn()) {
913  if (!$row || !$tablename) {
914  $row = $this->internal['currentRow'];
915  $tablename = $this->internal['currentTable'];
916  }
917  $conf = array_merge([
918  'beforeLastTag' => 1,
919  'iconTitle' => $title
920  ], $oConf);
921  $content = $this->cObj->editIcons($content, $tablename . ':' . ‪$fields, ‪$conf, $tablename . ':' . $row['uid'], $row, '&viewUrl=' . rawurlencode(GeneralUtility::getIndpEnv('REQUEST_URI')));
922  }
923  return $content;
924  }
925 
926  /***************************
927  *
928  * Localization, locallang functions
929  *
930  **************************/
939  public function ‪pi_getLL($key, $alternativeLabel = '')
940  {
941  $word = null;
942  if (!empty($this->LOCAL_LANG[$this->LLkey][$key][0]['target'])
943  || isset($this->LOCAL_LANG_UNSET[$this->LLkey][$key])
944  ) {
945  $word = $this->LOCAL_LANG[‪$this->LLkey][$key][0]['target'];
946  } elseif ($this->altLLkey) {
947  $alternativeLanguageKeys = GeneralUtility::trimExplode(',', $this->altLLkey, true);
948  $alternativeLanguageKeys = array_reverse($alternativeLanguageKeys);
949  foreach ($alternativeLanguageKeys as $languageKey) {
950  if (!empty($this->LOCAL_LANG[$languageKey][$key][0]['target'])
951  || isset($this->LOCAL_LANG_UNSET[$languageKey][$key])
952  ) {
953  // Alternative language translation for key exists
954  $word = $this->LOCAL_LANG[$languageKey][$key][0]['target'];
955  break;
956  }
957  }
958  }
959  if ($word === null) {
960  if (!empty($this->LOCAL_LANG['default'][$key][0]['target'])
961  || isset($this->LOCAL_LANG_UNSET['default'][$key])
962  ) {
963  // Get default translation (without charset conversion, english)
964  $word = $this->LOCAL_LANG['default'][$key][0]['target'];
965  } else {
966  // Return alternative string or empty
967  $word = isset($this->LLtestPrefixAlt) ? $this->LLtestPrefixAlt . $alternativeLabel : $alternativeLabel;
968  }
969  }
970  return isset($this->LLtestPrefix) ? $this->LLtestPrefix . $word : $word;
971  }
972 
983  public function ‪pi_loadLL($languageFilePath = '')
984  {
985  if ($this->LOCAL_LANG_loaded) {
986  return;
987  }
988 
989  if ($languageFilePath === '' && $this->scriptRelPath) {
990  $languageFilePath = 'EXT:' . $this->extKey . '/' . ‪PathUtility::dirname($this->scriptRelPath) . '/locallang.xlf';
991  }
992  if ($languageFilePath !== '') {
994  $languageFactory = GeneralUtility::makeInstance(LocalizationFactory::class);
995  $this->LOCAL_LANG = $languageFactory->getParsedData($languageFilePath, $this->LLkey);
996  $alternativeLanguageKeys = GeneralUtility::trimExplode(',', $this->altLLkey, true);
997  foreach ($alternativeLanguageKeys as $languageKey) {
998  $tempLL = $languageFactory->getParsedData($languageFilePath, $languageKey);
999  if ($this->LLkey !== 'default' && isset($tempLL[$languageKey])) {
1000  $this->LOCAL_LANG[$languageKey] = $tempLL[$languageKey];
1001  }
1002  }
1003  // Overlaying labels from TypoScript (including fictitious language keys for non-system languages!):
1004  if (isset($this->conf['_LOCAL_LANG.'])) {
1005  // Clear the "unset memory"
1006  $this->LOCAL_LANG_UNSET = [];
1007  foreach ($this->conf['_LOCAL_LANG.'] as $languageKey => $languageArray) {
1008  // Remove the dot after the language key
1009  $languageKey = substr($languageKey, 0, -1);
1010  // Don't process label if the language is not loaded
1011  if (is_array($languageArray) && isset($this->LOCAL_LANG[$languageKey])) {
1012  foreach ($languageArray as $labelKey => $labelValue) {
1013  if (!is_array($labelValue)) {
1014  $this->LOCAL_LANG[$languageKey][$labelKey][0]['target'] = $labelValue;
1015  if ($labelValue === '') {
1016  $this->LOCAL_LANG_UNSET[$languageKey][$labelKey] = '';
1017  }
1018  }
1019  }
1020  }
1021  }
1022  }
1023  }
1024  $this->LOCAL_LANG_loaded = true;
1025  }
1026 
1027  /***************************
1028  *
1029  * Database, queries
1030  *
1031  **************************/
1046  public function ‪pi_exec_query($table, $count = false, $addWhere = '', $mm_cat = '', $groupBy = '', $orderBy = '', $query = '')
1047  {
1048  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
1049  $queryBuilder->from($table);
1050 
1051  // Begin Query:
1052  if (!$query) {
1053  // This adds WHERE-clauses that ensures deleted, hidden, starttime/endtime/access records are NOT
1054  // selected, if they should not! Almost ALWAYS add this to your queries!
1055  $queryBuilder->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));
1056 
1057  // Fetches the list of PIDs to select from.
1058  // TypoScript property .pidList is a comma list of pids. If blank, current page id is used.
1059  // 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.
1060  $pidList = GeneralUtility::intExplode(',', $this->‪pi_getPidList($this->conf['pidList'], $this->conf['recursive']), true);
1061  if (is_array($mm_cat)) {
1062  $queryBuilder->from($mm_cat['table'])
1063  ->from($mm_cat['mmtable'])
1064  ->where(
1065  $queryBuilder->expr()->eq($table . '.uid', $queryBuilder->quoteIdentifier($mm_cat['mmtable'] . '.uid_local')),
1066  $queryBuilder->expr()->eq($mm_cat['table'] . '.uid', $queryBuilder->quoteIdentifier($mm_cat['mmtable'] . '.uid_foreign')),
1067  $queryBuilder->expr()->in(
1068  $table . '.pid',
1069  $queryBuilder->createNamedParameter($pidList, Connection::PARAM_INT_ARRAY)
1070  )
1071  );
1072  if (strcmp($mm_cat['catUidList'], '')) {
1073  $queryBuilder->andWhere(
1074  $queryBuilder->expr()->in(
1075  $mm_cat['table'] . '.uid',
1076  $queryBuilder->createNamedParameter(
1077  GeneralUtility::intExplode(',', $mm_cat['catUidList'], true),
1078  Connection::PARAM_INT_ARRAY
1079  )
1080  )
1081  );
1082  }
1083  } else {
1084  $queryBuilder->where(
1085  $queryBuilder->expr()->in(
1086  'pid',
1087  $queryBuilder->createNamedParameter($pidList, Connection::PARAM_INT_ARRAY)
1088  )
1089  );
1090  }
1091  } else {
1092  // Restrictions need to be handled by the $query parameter!
1093  $queryBuilder->getRestrictions()->removeAll();
1094 
1095  // Split the "FROM ... WHERE" string so we get the WHERE part and TABLE names separated...:
1096  list($tableListFragment, $whereFragment) = preg_split('/WHERE/i', trim($query), 2);
1097  foreach (‪QueryHelper::parseTableList($tableListFragment) as $tableNameAndAlias) {
1098  list($tableName, $tableAlias) = $tableNameAndAlias;
1099  $queryBuilder->from($tableName, $tableAlias);
1100  }
1101  $queryBuilder->where(‪QueryHelper::stripLogicalOperatorPrefix($whereFragment));
1102  }
1103 
1104  // Add '$addWhere'
1105  if ($addWhere) {
1106  $queryBuilder->andWhere(‪QueryHelper::stripLogicalOperatorPrefix($addWhere));
1107  }
1108  // Search word:
1109  if ($this->piVars['sword'] && $this->internal['searchFieldList']) {
1111  $this->cObj->searchWhere($this->piVars['sword'], $this->internal['searchFieldList'], $table)
1112  );
1113  if (!empty($searchWhere)) {
1114  $queryBuilder->andWhere($searchWhere);
1115  }
1116  }
1117 
1118  if ($count) {
1119  $queryBuilder->count('*');
1120  } else {
1121  // Add 'SELECT'
1122  ‪$fields = $this->‪pi_prependFieldsWithTable($table, $this->pi_listFields);
1123  $queryBuilder->select(...GeneralUtility::trimExplode(',', ‪$fields, true));
1124 
1125  // Order by data:
1126  if (!$orderBy && $this->internal['orderBy']) {
1127  if (GeneralUtility::inList($this->internal['orderByList'], $this->internal['orderBy'])) {
1128  $sorting = $this->internal['descFlag'] ? ' DESC' : 'ASC';
1129  $queryBuilder->orderBy($table . '.' . $this->internal['orderBy'], $sorting);
1130  }
1131  } elseif ($orderBy) {
1132  foreach (‪QueryHelper::parseOrderBy($orderBy) as $fieldNameAndSorting) {
1133  list($fieldName, $sorting) = $fieldNameAndSorting;
1134  $queryBuilder->addOrderBy($fieldName, $sorting);
1135  }
1136  }
1137 
1138  // Limit data:
1139  $pointer = (int)$this->piVars['pointer'];
1140  $results_at_a_time = ‪MathUtility::forceIntegerInRange($this->internal['results_at_a_time'], 1, 1000);
1141  $queryBuilder->setFirstResult($pointer * $results_at_a_time)
1142  ->setMaxResults($results_at_a_time);
1143 
1144  // Grouping
1145  if (!empty($groupBy)) {
1146  $queryBuilder->groupBy(...‪QueryHelper::parseGroupBy($groupBy));
1147  }
1148  }
1149 
1150  return $queryBuilder->execute();
1151  }
1152 
1162  public function ‪pi_getRecord($table, $uid, $checkPage = false)
1163  {
1164  return $this->frontendController->sys_page->checkRecord($table, $uid, $checkPage);
1165  }
1166 
1174  public function ‪pi_getPidList($pid_list, $recursive = 0)
1175  {
1176  if (!strcmp($pid_list, '')) {
1177  $pid_list = $this->frontendController->id;
1178  }
1179  $recursive = ‪MathUtility::forceIntegerInRange($recursive, 0);
1180  $pid_list_arr = array_unique(GeneralUtility::trimExplode(',', $pid_list, true));
1181  $pid_list = [];
1182  foreach ($pid_list_arr as $val) {
1183  $val = ‪MathUtility::forceIntegerInRange($val, 0);
1184  if ($val) {
1185  $_list = $this->cObj->getTreeList(-1 * $val, $recursive);
1186  if ($_list) {
1187  $pid_list[] = $_list;
1188  }
1189  }
1190  }
1191  return implode(',', $pid_list);
1192  }
1193 
1201  public function ‪pi_prependFieldsWithTable($table, $fieldList)
1202  {
1203  $list = GeneralUtility::trimExplode(',', $fieldList, true);
1204  $return = [];
1205  foreach ($list as $listItem) {
1206  $return[] = $table . '.' . $listItem;
1207  }
1208  return implode(',', $return);
1209  }
1210 
1222  public function ‪pi_getCategoryTableContents($table, $pid, $whereClause = '', $groupBy = '', $orderBy = '', $limit = '')
1223  {
1224  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
1225  $queryBuilder->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));
1226  $queryBuilder->select('*')
1227  ->from($table)
1228  ->where(
1229  $queryBuilder->expr()->eq(
1230  'pid',
1231  $queryBuilder->createNamedParameter($pid, \PDO::PARAM_INT)
1232  ),
1234  );
1235 
1236  if (!empty($orderBy)) {
1237  foreach (‪QueryHelper::parseOrderBy($orderBy) as $fieldNameAndSorting) {
1238  list($fieldName, $sorting) = $fieldNameAndSorting;
1239  $queryBuilder->addOrderBy($fieldName, $sorting);
1240  }
1241  }
1242 
1243  if (!empty($groupBy)) {
1244  $queryBuilder->groupBy(...‪QueryHelper::parseGroupBy($groupBy));
1245  }
1246 
1247  if (!empty($limit)) {
1248  $limitValues = GeneralUtility::intExplode(',', $limit, true);
1249  if (count($limitValues) === 1) {
1250  $queryBuilder->setMaxResults($limitValues[0]);
1251  } else {
1252  $queryBuilder->setFirstResult($limitValues[0])
1253  ->setMaxResults($limitValues[1]);
1254  }
1255  }
1256 
1257  $result = $queryBuilder->execute();
1258  $outArr = [];
1259  while ($row = $result->fetch()) {
1260  $outArr[$row['uid']] = $row;
1261  }
1262  return $outArr;
1263  }
1264 
1265  /***************************
1266  *
1267  * Various
1268  *
1269  **************************/
1278  public function ‪pi_isOnlyFields($fList, $lowerThan = -1)
1279  {
1280  $lowerThan = $lowerThan == -1 ? $this->pi_lowerThan : $lowerThan;
1281  $fList = GeneralUtility::trimExplode(',', $fList, true);
1282  $tempPiVars = ‪$this->piVars;
1283  foreach ($fList as $k) {
1284  if (!‪MathUtility::canBeInterpretedAsInteger($tempPiVars[$k]) || $tempPiVars[$k] < $lowerThan) {
1285  unset($tempPiVars[$k]);
1286  }
1287  }
1288  if (empty($tempPiVars)) {
1289  //@TODO: How do we deal with this? return TRUE would be the right thing to do here but that might be breaking
1290  return 1;
1291  }
1292  return null;
1293  }
1294 
1304  public function ‪pi_autoCache($inArray)
1305  {
1306  if (is_array($inArray)) {
1307  foreach ($inArray as $fN => $fV) {
1308  if (!strcmp($inArray[$fN], '')) {
1309  unset($inArray[$fN]);
1310  } elseif (is_array($this->pi_autoCacheFields[$fN])) {
1311  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]) {
1312  unset($inArray[$fN]);
1313  }
1314  if (is_array($this->pi_autoCacheFields[$fN]['list']) && in_array($inArray[$fN], $this->pi_autoCacheFields[$fN]['list'])) {
1315  unset($inArray[$fN]);
1316  }
1317  }
1318  }
1319  }
1320  if (empty($inArray)) {
1321  //@TODO: How do we deal with this? return TRUE would be the right thing to do here but that might be breaking
1322  return 1;
1323  }
1324  return null;
1325  }
1326 
1335  public function ‪pi_RTEcssText($str)
1336  {
1337  $parseFunc = $this->frontendController->tmpl->setup['lib.']['parseFunc_RTE.'];
1338  if (is_array($parseFunc)) {
1339  $str = $this->cObj->parseFunc($str, $parseFunc);
1340  }
1341  return $str;
1342  }
1343 
1344  /*******************************
1345  *
1346  * FlexForms related functions
1347  *
1348  *******************************/
1354  public function ‪pi_initPIflexForm($field = 'pi_flexform')
1355  {
1356  // Converting flexform data into array:
1357  if (!is_array($this->cObj->data[$field]) && $this->cObj->data[$field]) {
1358  $this->cObj->data[$field] = GeneralUtility::xml2array($this->cObj->data[$field]);
1359  if (!is_array($this->cObj->data[$field])) {
1360  $this->cObj->data[$field] = [];
1361  }
1362  }
1363  }
1364 
1375  public function ‪pi_getFFvalue($T3FlexForm_array, $fieldName, $sheet = 'sDEF', $lang = 'lDEF', $value = 'vDEF')
1376  {
1377  $sheetArray = is_array($T3FlexForm_array) ? $T3FlexForm_array['data'][$sheet][$lang] : '';
1378  if (is_array($sheetArray)) {
1379  return $this->‪pi_getFFvalueFromSheetArray($sheetArray, explode('/', $fieldName), $value);
1380  }
1381  return null;
1382  }
1383 
1394  public function ‪pi_getFFvalueFromSheetArray($sheetArray, $fieldNameArr, $value)
1395  {
1396  $tempArr = $sheetArray;
1397  foreach ($fieldNameArr as $k => $v) {
1399  if (is_array($tempArr)) {
1400  $c = 0;
1401  foreach ($tempArr as $values) {
1402  if ($c == $v) {
1403  $tempArr = $values;
1404  break;
1405  }
1406  $c++;
1407  }
1408  }
1409  } else {
1410  $tempArr = $tempArr[$v];
1411  }
1412  }
1413  return $tempArr[$value];
1414  }
1415 
1421  protected function ‪getCurrentSiteLanguage(): ?‪SiteLanguage
1422  {
1423  $request = ‪$GLOBALS['TYPO3_REQUEST'] ?? null;
1424  return $request
1425  && $request instanceof ServerRequestInterface
1426  && $request->getAttribute('language') instanceof ‪SiteLanguage
1427  ? $request->getAttribute('language')
1428  : null;
1429  }
1430 }
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$templateService
‪MarkerBasedTemplateService $templateService
Definition: AbstractPlugin.php:209
‪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:268
‪TYPO3\CMS\Core\Database\Query\QueryHelper\parseOrderBy
‪static array array[] parseOrderBy(string $input)
Definition: QueryHelper.php:42
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_linkToPage
‪string pi_linkToPage($str, $id, $target='', $urlParameters=[])
Definition: AbstractPlugin.php:345
‪TYPO3\CMS\Core\Utility\PathUtility
Definition: PathUtility.php:23
‪TYPO3\CMS\Core\Utility\MathUtility\canBeInterpretedAsInteger
‪static bool canBeInterpretedAsInteger($var)
Definition: MathUtility.php:73
‪TYPO3\CMS\Core\Database\Query\QueryHelper\parseTableList
‪static array array[] parseTableList(string $input)
Definition: QueryHelper.php:70
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_list_header
‪string pi_list_header()
Definition: AbstractPlugin.php:753
‪TYPO3\CMS\Core\Utility\PathUtility\dirname
‪static string dirname($path)
Definition: PathUtility.php:185
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_list_modeSelector
‪string pi_list_modeSelector($items=[], $tableParams='')
Definition: AbstractPlugin.php:673
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getPidList
‪string pi_getPidList($pid_list, $recursive=0)
Definition: AbstractPlugin.php:1147
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$pi_USER_INT_obj
‪bool $pi_USER_INT_obj
Definition: AbstractPlugin.php:173
‪TYPO3\CMS\Core\Localization\LocalizationFactory
Definition: LocalizationFactory.php:25
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_list_makelist
‪string pi_list_makelist($statement, $tableParams='')
Definition: AbstractPlugin.php:707
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getClassName
‪string pi_getClassName($class)
Definition: AbstractPlugin.php:769
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getLL
‪string pi_getLL($key, $alternativeLabel='')
Definition: AbstractPlugin.php:912
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_initPIflexForm
‪pi_initPIflexForm($field='pi_flexform')
Definition: AbstractPlugin.php:1327
‪TYPO3\CMS\Core\Database\Query\QueryHelper\parseGroupBy
‪static array string[] parseGroupBy(string $input)
Definition: QueryHelper.php:100
‪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:31
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_prependFieldsWithTable
‪string pi_prependFieldsWithTable($table, $fieldList)
Definition: AbstractPlugin.php:1174
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin
Definition: AbstractPlugin.php:42
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$cObj
‪ContentObjectRenderer $cObj
Definition: AbstractPlugin.php:47
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$conf
‪array $conf
Definition: AbstractPlugin.php:189
‪TYPO3\CMS\Core\Localization\Locales
Definition: Locales.php:29
‪TYPO3\CMS\Core\Utility\ArrayUtility\mergeRecursiveWithOverrule
‪static mergeRecursiveWithOverrule(array &$original, array $overrule, $addKeys=true, $includeEmptyValues=true, $enableUnsetFeature=true)
Definition: ArrayUtility.php:614
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$pi_autoCacheEn
‪bool $pi_autoCacheEn
Definition: AbstractPlugin.php:165
‪TYPO3\CMS\Frontend\Plugin
Definition: AbstractPlugin.php:2
‪$fields
‪$fields
Definition: pages.php:4
‪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:1195
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_linkTP
‪string pi_linkTP($str, $urlParameters=[], $cache=false, $altPageId=0)
Definition: AbstractPlugin.php:361
‪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:1367
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$pi_checkCHash
‪bool $pi_checkCHash
Definition: AbstractPlugin.php:180
‪TYPO3\CMS\Core\Site\Entity\SiteLanguage
Definition: SiteLanguage.php:25
‪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:456
‪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:199
‪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:804
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\getCurrentSiteLanguage
‪getCurrentSiteLanguage()
Definition: AbstractPlugin.php:1394
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getPageLink
‪string pi_getPageLink($id, $target='', $urlParameters=[])
Definition: AbstractPlugin.php:328
‪TYPO3\CMS\Core\Database\Query\QueryHelper
Definition: QueryHelper.php:30
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_setPiVarDefaults
‪pi_setPiVarDefaults()
Definition: AbstractPlugin.php:299
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getEditIcon
‪string pi_getEditIcon($content, $fields, $title='', $row=[], $tablename='', $oConf=[])
Definition: AbstractPlugin.php:883
‪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:219
‪TYPO3\CMS\Core\Utility\HttpUtility\buildQueryString
‪static string buildQueryString(array $parameters, string $prependCharacter='', bool $skipEmptyParameters=false)
Definition: HttpUtility.php:160
‪$locales
‪$locales
Definition: be_users.php:6
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getFFvalue
‪string null pi_getFFvalue($T3FlexForm_array, $fieldName, $sheet='sDEF', $lang='lDEF', $value='vDEF')
Definition: AbstractPlugin.php:1348
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_autoCache
‪bool null pi_autoCache($inArray)
Definition: AbstractPlugin.php:1277
‪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:1019
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_linkTP_keepPIvars
‪string pi_linkTP_keepPIvars($str, $overrulePIvars=[], $cache=false, $clearAnyway=false, $altPageId=0)
Definition: AbstractPlugin.php:384
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$pi_lowerThan
‪int $pi_lowerThan
Definition: AbstractPlugin.php:149
‪$output
‪$output
Definition: annotationChecker.php:113
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_linkTP_keepPIvars_url
‪string pi_linkTP_keepPIvars_url($overrulePIvars=[], $cache=false, $clearAnyway=false, $altPageId=0)
Definition: AbstractPlugin.php:409
‪TYPO3\CMS\Core\Database\Connection
Definition: Connection.php:31
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$pi_EPtemp_cObj
‪ContentObjectRenderer $pi_EPtemp_cObj
Definition: AbstractPlugin.php:195
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_isOnlyFields
‪bool null pi_isOnlyFields($fList, $lowerThan=-1)
Definition: AbstractPlugin.php:1251
‪TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
Definition: TypoScriptFrontendController.php:97
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_RTEcssText
‪string pi_RTEcssText($str)
Definition: AbstractPlugin.php:1308
‪TYPO3\CMS\Core\Database\Query\QueryHelper\stripLogicalOperatorPrefix
‪static string stripLogicalOperatorPrefix(string $constraint)
Definition: QueryHelper.php:163
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_loadLL
‪pi_loadLL($languageFilePath='')
Definition: AbstractPlugin.php:956
‪TYPO3\CMS\Core\Utility\ArrayUtility
Definition: ArrayUtility.php:23
‪$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:783
‪TYPO3\CMS\Core\Utility\MathUtility
Definition: MathUtility.php:21
‪TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
Definition: ContentObjectRenderer.php:91
‪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:740
‪TYPO3\CMS\Core\Utility\HttpUtility
Definition: HttpUtility.php:21
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$LOCAL_LANG
‪array $LOCAL_LANG
Definition: AbstractPlugin.php:95
‪TYPO3\CMS\Core\Database\ConnectionPool
Definition: ConnectionPool.php:44
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_getRecord
‪array pi_getRecord($table, $uid, $checkPage=false)
Definition: AbstractPlugin.php:1135
‪TYPO3\CMS\Core\Service\MarkerBasedTemplateService
Definition: MarkerBasedTemplateService.php:25
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:45
‪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:500
‪TYPO3\CMS\Core\Database\Query\Restriction\FrontendRestrictionContainer
Definition: FrontendRestrictionContainer.php:29
‪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:842
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\$frontendController
‪TypoScriptFrontendController $frontendController
Definition: AbstractPlugin.php:205
‪TYPO3\CMS\Frontend\Plugin\AbstractPlugin\pi_list_linkSingle
‪string pi_list_linkSingle($str, $uid, $cache=false, $mergeArr=[], $urlOnly=false, $altPageId=0)
Definition: AbstractPlugin.php:428