From d5ccd425e80e7f754b79a82440c3e817d3e60c13 Mon Sep 17 00:00:00 2001 From: Wouter Wolters Date: Tue, 30 Aug 2016 14:34:52 +0200 Subject: [PATCH] [TASK] Migrate to short array syntax As decided during T3ACME we will use the short array syntax in master. The 7.6 branch will also be done to make backporting easier. Resolves: #77692 Releases: master,7.6 Change-Id: I37e9484b1012fc9161148257a842054c24d162ba Reviewed-on: https://review.typo3.org/49651 Reviewed-by: Georg Ringer Tested-by: Georg Ringer Reviewed-by: Susanne Moog Tested-by: Susanne Moog --- Classes/FrontendEditPanel.php | 16 ++++++++-------- ext_emconf.php | 16 ++++++++-------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Classes/FrontendEditPanel.php b/Classes/FrontendEditPanel.php index aaa2024..cb46b98 100644 --- a/Classes/FrontendEditPanel.php +++ b/Classes/FrontendEditPanel.php @@ -74,7 +74,7 @@ class FrontendEditPanel $this->frontendController = $frontendController ?: $GLOBALS['TSFE']; $this->backendUser = $backendUser ?: $GLOBALS['BE_USER']; $this->cObj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class); - $this->cObj->start(array()); + $this->cObj->start([]); $this->iconFactory = GeneralUtility::makeInstance(IconFactory::class); } @@ -93,7 +93,7 @@ class FrontendEditPanel * @param array $hiddenFields * @return string The input content string with the editPanel appended. This function returns only an edit panel appended to the content string if a backend user is logged in (and has the correct permissions). Otherwise the content string is directly returned. */ - public function editPanel($content, array $conf, $currentRecord = '', array $dataArr = array(), $table = '', array $allow = array(), $newUID = 0, array $hiddenFields = array()) + public function editPanel($content, array $conf, $currentRecord = '', array $dataArr = [], $table = '', array $allow = [], $newUID = 0, array $hiddenFields = []) { $hiddenFieldString = $command = ''; @@ -195,7 +195,7 @@ class FrontendEditPanel $hidden = $this->isDisabled($table, $dataArr) ? ' typo3-feedit-element-hidden' : ''; $outerWrapConfig = isset($conf['stdWrap.']) ? $conf['stdWrap.'] - : array('wrap' => '
|
'); + : ['wrap' => '
|
']; $finalOut = $this->cObj->stdWrap($finalOut, $outerWrapConfig); return $finalOut; @@ -216,7 +216,7 @@ class FrontendEditPanel * @param string $fieldList * @return string The input content string, possibly with edit icons added (not necessarily in the end but just after the last string of normal content. */ - public function editIcons($content, $params, array $conf = array(), $currentRecord = '', array $dataArr = array(), $addUrlParamStr = '', $table, $editUid, $fieldList) + public function editIcons($content, $params, array $conf = [], $currentRecord = '', array $dataArr = [], $addUrlParamStr = '', $table, $editUid, $fieldList) { // Special content is about to be shown, so the cache must be disabled. $this->frontendController->set_no_cache('Display frontend edit icons', true); @@ -228,12 +228,12 @@ class FrontendEditPanel $url = BackendUtility::getModuleUrl( 'record_edit', - array( + [ 'edit[' . $table . '][' . $editUid . ']' => 'edit', 'columnsOnly' => $fieldList, 'noView' => $nV, 'feEdit' => 1 - ) + ] ) . $addUrlParamStr; $icon = $this->editPanelLinkWrap_doWrap($iconImg, $url, 'content-link'); if ($conf['beforeLastTag'] < 0) { @@ -269,7 +269,7 @@ class FrontendEditPanel $nV = GeneralUtility::_GP('ADMCMD_view') ? 1 : 0; if ($cmd == 'edit') { $rParts = explode(':', $currentRecord); - $out = $this->editPanelLinkWrap_doWrap($string, BackendUtility::getModuleUrl('record_edit', array('edit[' . $rParts[0] . '][' . $rParts[1] . ']' => 'edit', 'noView' => $nV, 'feEdit' => 1)), $currentRecord); + $out = $this->editPanelLinkWrap_doWrap($string, BackendUtility::getModuleUrl('record_edit', ['edit[' . $rParts[0] . '][' . $rParts[1] . ']' => 'edit', 'noView' => $nV, 'feEdit' => 1]), $currentRecord); } elseif ($cmd == 'new') { $rParts = explode(':', $currentRecord); if ($rParts[0] == 'pages') { @@ -278,7 +278,7 @@ class FrontendEditPanel if (!(int)$nPid) { $nPid = MathUtility::canBeInterpretedAsInteger($rParts[1]) ? -$rParts[1] : $this->frontendController->id; } - $out = $this->editPanelLinkWrap_doWrap($string, BackendUtility::getModuleUrl('record_edit', array('edit[' . $rParts[0] . '][' . $nPid . ']' => 'new', 'noView' => $nV)), $currentRecord); + $out = $this->editPanelLinkWrap_doWrap($string, BackendUtility::getModuleUrl('record_edit', ['edit[' . $rParts[0] . '][' . $nPid . ']' => 'new', 'noView' => $nV]), $currentRecord); } } else { if ($confirm && $this->backendUser->jsConfirmation(JsConfirmation::FE_EDIT)) { diff --git a/ext_emconf.php b/ext_emconf.php index b2debc1..c926db7 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -1,5 +1,5 @@ 'Frontend Editing', 'description' => '', 'category' => 'fe', @@ -11,11 +11,11 @@ $EM_CONF[$_EXTKEY] = array( 'createDirs' => '', 'clearCacheOnLoad' => 0, 'version' => '8.3.0', - 'constraints' => array( - 'depends' => array( + 'constraints' => [ + 'depends' => [ 'typo3' => '8.3.0-8.3.99', - ), - 'conflicts' => array(), - 'suggests' => array(), - ), -); + ], + 'conflicts' => [], + 'suggests' => [], + ], +];