TYPO3 CMS  TYPO3_7-6
CshViewHelper.php
Go to the documentation of this file.
1 <?php
3 
4 /* *
5  * This script is backported from the TYPO3 Flow package "TYPO3.Fluid". *
6  * *
7  * It is free software; you can redistribute it and/or modify it under *
8  * the terms of the GNU Lesser General Public License, either version 3 *
9  * of the License, or (at your option) any later version. *
10  * *
11  * *
12  * This script is distributed in the hope that it will be useful, but *
13  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- *
14  * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser *
15  * General Public License for more details. *
16  * *
17  * You should have received a copy of the GNU Lesser General Public *
18  * License along with the script. *
19  * If not, see http://www.gnu.org/licenses/lgpl.html *
20  * *
21  * The TYPO3 project - inspiring people to share! *
22  * */
23 
28 
53 {
64  public function render($table = null, $field = '', $iconOnly = false, $styleAttributes = '', $wrap = '')
65  {
66  if ($iconOnly) {
68  'The option iconOnly has no effect anymore and can be removed without problems. The parameter will be removed in TYPO3 CMS 8.'
69  );
70  }
71  if ($styleAttributes) {
73  'The option styleAttributes has no effect anymore and can be removed without problems. The parameter will be removed in TYPO3 CMS 8.'
74  );
75  }
76  return static::renderStatic(
77  [
78  'table' => $table,
79  'field' => $field,
80  'wrap' => $wrap
81  ],
83  $this->renderingContext
84  );
85  }
86 
94  {
95  $table = $arguments['table'];
96  $field = $arguments['field'];
97  $wrap = $arguments['wrap'];
98 
99  if ($table === null) {
100  $currentRequest = $renderingContext->getControllerContext()->getRequest();
101  $moduleName = $currentRequest->getPluginName();
102  $table = '_MOD_' . $moduleName;
103  }
104  return '<div class="docheader-csh">' . BackendUtility::cshItem($table, $field, '', $wrap) . '</div>';
105  }
106 }
render($table=null, $field='', $iconOnly=false, $styleAttributes='', $wrap='')
static renderStatic(array $arguments, \Closure $renderChildrenClosure, RenderingContextInterface $renderingContext)
static cshItem($table, $field, $_='', $wrap='')