‪TYPO3CMS  10.4
ContentObjectArrayContentObject.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 
20 
25 {
32  public function ‪render($conf = [])
33  {
34  if (empty($conf)) {
35  $this->‪getTimeTracker()->‪setTSlogMessage('No elements in this content object array (COBJ_ARRAY, COA).', 2);
36  return '';
37  }
38  if (!empty($conf['if.']) && !$this->cObj->checkIf($conf['if.'])) {
39  return '';
40  }
41 
42  $content = $this->cObj->cObjGet($conf);
43  $wrap = isset($conf['wrap.']) ? $this->cObj->stdWrap($conf['wrap'], $conf['wrap.']) : $conf['wrap'];
44  if ($wrap) {
45  $content = $this->cObj->wrap($content, $wrap);
46  }
47  if (isset($conf['stdWrap.'])) {
48  $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
49  }
50  return $content;
51  }
52 
56  protected function ‪getTimeTracker()
57  {
58  return GeneralUtility::makeInstance(TimeTracker::class);
59  }
60 }
‪TYPO3\CMS\Frontend\ContentObject
Definition: AbstractContentObject.php:16
‪TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject\getTimeTracker
‪TimeTracker getTimeTracker()
Definition: ContentObjectArrayContentObject.php:56
‪TYPO3\CMS\Core\TimeTracker\TimeTracker\setTSlogMessage
‪setTSlogMessage($content, $num=0)
Definition: TimeTracker.php:215
‪TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
Definition: AbstractContentObject.php:25
‪TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject
Definition: ContentObjectArrayContentObject.php:25
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject\render
‪string render($conf=[])
Definition: ContentObjectArrayContentObject.php:32
‪TYPO3\CMS\Core\TimeTracker\TimeTracker
Definition: TimeTracker.php:30