mirror of
https://github.com/FriendsOfTYPO3/feedit.git
synced 2024-11-22 06:26:09 +01:00
[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 <georg.ringer@gmail.com> Tested-by: Georg Ringer <georg.ringer@gmail.com> Reviewed-by: Susanne Moog <susanne.moog@typo3.org> Tested-by: Susanne Moog <susanne.moog@typo3.org>
This commit is contained in:
parent
252f24d2d9
commit
d5ccd425e8
2 changed files with 16 additions and 16 deletions
|
@ -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' => '<div class="typo3-feedit-element' . $hidden . '">|</div>');
|
||||
: ['wrap' => '<div class="typo3-feedit-element' . $hidden . '">|</div>'];
|
||||
$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)) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
$EM_CONF[$_EXTKEY] = array(
|
||||
$EM_CONF[$_EXTKEY] = [
|
||||
'title' => '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' => [],
|
||||
],
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue