mirror of
https://github.com/FriendsOfTYPO3/feedit.git
synced 2024-11-09 17: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->frontendController = $frontendController ?: $GLOBALS['TSFE'];
|
||||||
$this->backendUser = $backendUser ?: $GLOBALS['BE_USER'];
|
$this->backendUser = $backendUser ?: $GLOBALS['BE_USER'];
|
||||||
$this->cObj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
|
$this->cObj = GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer::class);
|
||||||
$this->cObj->start(array());
|
$this->cObj->start([]);
|
||||||
$this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
|
$this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ class FrontendEditPanel
|
||||||
* @param array $hiddenFields
|
* @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.
|
* @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 = '';
|
$hiddenFieldString = $command = '';
|
||||||
|
|
||||||
|
@ -195,7 +195,7 @@ class FrontendEditPanel
|
||||||
$hidden = $this->isDisabled($table, $dataArr) ? ' typo3-feedit-element-hidden' : '';
|
$hidden = $this->isDisabled($table, $dataArr) ? ' typo3-feedit-element-hidden' : '';
|
||||||
$outerWrapConfig = isset($conf['stdWrap.'])
|
$outerWrapConfig = isset($conf['stdWrap.'])
|
||||||
? $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);
|
$finalOut = $this->cObj->stdWrap($finalOut, $outerWrapConfig);
|
||||||
|
|
||||||
return $finalOut;
|
return $finalOut;
|
||||||
|
@ -216,7 +216,7 @@ class FrontendEditPanel
|
||||||
* @param string $fieldList
|
* @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.
|
* @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.
|
// Special content is about to be shown, so the cache must be disabled.
|
||||||
$this->frontendController->set_no_cache('Display frontend edit icons', true);
|
$this->frontendController->set_no_cache('Display frontend edit icons', true);
|
||||||
|
@ -228,12 +228,12 @@ class FrontendEditPanel
|
||||||
|
|
||||||
$url = BackendUtility::getModuleUrl(
|
$url = BackendUtility::getModuleUrl(
|
||||||
'record_edit',
|
'record_edit',
|
||||||
array(
|
[
|
||||||
'edit[' . $table . '][' . $editUid . ']' => 'edit',
|
'edit[' . $table . '][' . $editUid . ']' => 'edit',
|
||||||
'columnsOnly' => $fieldList,
|
'columnsOnly' => $fieldList,
|
||||||
'noView' => $nV,
|
'noView' => $nV,
|
||||||
'feEdit' => 1
|
'feEdit' => 1
|
||||||
)
|
]
|
||||||
) . $addUrlParamStr;
|
) . $addUrlParamStr;
|
||||||
$icon = $this->editPanelLinkWrap_doWrap($iconImg, $url, 'content-link');
|
$icon = $this->editPanelLinkWrap_doWrap($iconImg, $url, 'content-link');
|
||||||
if ($conf['beforeLastTag'] < 0) {
|
if ($conf['beforeLastTag'] < 0) {
|
||||||
|
@ -269,7 +269,7 @@ class FrontendEditPanel
|
||||||
$nV = GeneralUtility::_GP('ADMCMD_view') ? 1 : 0;
|
$nV = GeneralUtility::_GP('ADMCMD_view') ? 1 : 0;
|
||||||
if ($cmd == 'edit') {
|
if ($cmd == 'edit') {
|
||||||
$rParts = explode(':', $currentRecord);
|
$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') {
|
} elseif ($cmd == 'new') {
|
||||||
$rParts = explode(':', $currentRecord);
|
$rParts = explode(':', $currentRecord);
|
||||||
if ($rParts[0] == 'pages') {
|
if ($rParts[0] == 'pages') {
|
||||||
|
@ -278,7 +278,7 @@ class FrontendEditPanel
|
||||||
if (!(int)$nPid) {
|
if (!(int)$nPid) {
|
||||||
$nPid = MathUtility::canBeInterpretedAsInteger($rParts[1]) ? -$rParts[1] : $this->frontendController->id;
|
$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 {
|
} else {
|
||||||
if ($confirm && $this->backendUser->jsConfirmation(JsConfirmation::FE_EDIT)) {
|
if ($confirm && $this->backendUser->jsConfirmation(JsConfirmation::FE_EDIT)) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?php
|
<?php
|
||||||
$EM_CONF[$_EXTKEY] = array(
|
$EM_CONF[$_EXTKEY] = [
|
||||||
'title' => 'Frontend Editing',
|
'title' => 'Frontend Editing',
|
||||||
'description' => '',
|
'description' => '',
|
||||||
'category' => 'fe',
|
'category' => 'fe',
|
||||||
|
@ -11,11 +11,11 @@ $EM_CONF[$_EXTKEY] = array(
|
||||||
'createDirs' => '',
|
'createDirs' => '',
|
||||||
'clearCacheOnLoad' => 0,
|
'clearCacheOnLoad' => 0,
|
||||||
'version' => '8.3.0',
|
'version' => '8.3.0',
|
||||||
'constraints' => array(
|
'constraints' => [
|
||||||
'depends' => array(
|
'depends' => [
|
||||||
'typo3' => '8.3.0-8.3.99',
|
'typo3' => '8.3.0-8.3.99',
|
||||||
),
|
],
|
||||||
'conflicts' => array(),
|
'conflicts' => [],
|
||||||
'suggests' => array(),
|
'suggests' => [],
|
||||||
),
|
],
|
||||||
);
|
];
|
||||||
|
|
Loading…
Reference in a new issue