‪TYPO3CMS  ‪main
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 
18 use Psr\Log\LogLevel;
21 
26 {
33  public function ‪render($conf = [])
34  {
35  if (empty($conf)) {
36  $this->‪getTimeTracker()->‪setTSlogMessage('No elements in this content object array (COBJ_ARRAY, COA).', LogLevel::WARNING);
37  return '';
38  }
39  if (!empty($conf['if.']) && !$this->cObj->checkIf($conf['if.'])) {
40  return '';
41  }
42 
43  $content = $this->cObj->cObjGet($conf);
44  $wrap = $this->cObj->stdWrapValue('wrap', $conf);
45  if ($wrap) {
46  $content = $this->cObj->wrap($content, $wrap);
47  }
48  if (isset($conf['stdWrap.'])) {
49  $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
50  }
51  return $content;
52  }
53 
57  protected function ‪getTimeTracker()
58  {
59  return GeneralUtility::makeInstance(TimeTracker::class);
60  }
61 }
‪TYPO3\CMS\Frontend\ContentObject
Definition: AbstractContentObject.php:18
‪TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject\getTimeTracker
‪TimeTracker getTimeTracker()
Definition: ContentObjectArrayContentObject.php:57
‪TYPO3\CMS\Frontend\ContentObject\AbstractContentObject
Definition: AbstractContentObject.php:31
‪TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject
Definition: ContentObjectArrayContentObject.php:26
‪TYPO3\CMS\Core\TimeTracker\TimeTracker\setTSlogMessage
‪setTSlogMessage(string $content, string $logLevel=LogLevel::INFO)
Definition: TimeTracker.php:143
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject\render
‪string render($conf=[])
Definition: ContentObjectArrayContentObject.php:33
‪TYPO3\CMS\Core\TimeTracker\TimeTracker
Definition: TimeTracker.php:34