Commit 29fe1576 authored by mjankiewicz's avatar mjankiewicz Committed by Frank Nägler
Browse files

[TASK] Rename method "JStop"" to "addCssFiles"

The old name has nothing to do with JS.

Resolves: #75363
Releases: master
Change-Id: Ie6dec85a89ca39561b04450bcb871ce272f8c49a
Reviewed-on: https://review.typo3.org/50080


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: Karol Lamparski's avatarKarol Lamparski <klamparski@gmail.com>
Tested-by: Karol Lamparski's avatarKarol Lamparski <klamparski@gmail.com>
Reviewed-by: Frank Nägler's avatarFrank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Nägler's avatarFrank Naegler <frank.naegler@typo3.org>
parent daa3a812
......@@ -980,7 +980,7 @@ class EditDocumentController extends AbstractModule
$this->viewId,
'mod.xMOD_alt_doc'
) : [];
$body = $this->formResultCompiler->JStop();
$body = $this->formResultCompiler->addCssFiles();
$body .= $this->compileForm($editForm);
$body .= $this->formResultCompiler->printNeededJSFunctions();
$body .= '</form>';
......@@ -1146,7 +1146,7 @@ class EditDocumentController extends AbstractModule
$formResult['doSaveFieldName'] = 'doSave';
// @todo: Put all the stuff into FormEngine as final "compiler" class
// @todo: This is done here for now to not rewrite JStop()
// @todo: This is done here for now to not rewrite addCssFiles()
// @todo: and printNeededJSFunctions() now
$this->formResultCompiler->mergeResult($formResult);
......
......@@ -967,7 +967,7 @@ class PageLayoutController
<input type="hidden" name="redirect" value="' . htmlspecialchars($redirect) . '" />
';
// Add JavaScript as needed around the form:
$content = $formResultCompiler->JStop() . $panel . $formResultCompiler->printNeededJSFunctions();
$content = $formResultCompiler->addCssFiles() . $panel . $formResultCompiler->printNeededJSFunctions();
// Display "is-locked" message:
if ($command === 'edit') {
......
......@@ -212,7 +212,7 @@ class RteController extends AbstractWizardController
$formContent .= '<input type="hidden" name="redirect" value="' . htmlspecialchars($this->R_URI) . '" />
<input type="hidden" name="_serialNumber" value="' . md5(microtime()) . '" />';
// Finally, add the whole setup:
$this->content .= $formResultCompiler->JStop()
$this->content .= $formResultCompiler->addCssFiles()
. $formContent
. $formResultCompiler->printNeededJSFunctions();
} else {
......
......@@ -169,8 +169,20 @@ class FormResultCompiler
* JavaScript code added BEFORE the form is drawn:
*
* @return string
* @deprecated since TYPO3 v8, will be removed in TYPO3 v9
*/
public function JStop()
{
GeneralUtility::logDeprecatedFunction();
return $this->addCssFiles();
}
/**
* Adds CSS files BEFORE the form is drawn
*
* @return string
*/
public function addCssFiles()
{
$pageRenderer = $this->getPageRenderer();
foreach ($this->stylesheetFiles as $stylesheetFile) {
......
.. include:: ../../Includes.txt
=========================================================================
Deprecation: #75363 - Deprecate FormResultCompiler->JStop()
=========================================================================
See :issue:`75363`
Description
===========
The method has been renamed to `addCssFiles()`. The old method name is
still present as a deprecated alias, which will be removed in TYPO3 v9.
Impact
======
Calling this method will trigger a deprecation log entry.
Affected Installations
======================
Any extensions calling `JStop()`.
Migration
=========
Instead of :php:`JStop()` use :php:`addCssFiles()`.
.. index:: php
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment