Commit 6d0940ca authored by Oliver Bartsch's avatar Oliver Bartsch
Browse files

[!!!][TASK] Remove methods from AbstractSectionMarkupGeneratedEvent

Since the fluid based page module is the only
available variant since v11, two PageLayoutView
related methods were deprecated in favour of
their fluid based page module counterparts.

Therefore, the deprecated methods are now removed.

Resolves: #96211
Related: #95261
Releases: main
Change-Id: Ie33249e521e0973b1ba113d4fdd057e115ab0b89
parent 35ad5989
Pipeline #20444 passed with stages
in 11 minutes and 14 seconds
......@@ -22,7 +22,6 @@ use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Backend\View\Event\AfterSectionMarkupGeneratedEvent;
use TYPO3\CMS\Backend\View\Event\BeforeSectionMarkupGeneratedEvent;
use TYPO3\CMS\Backend\View\PageLayoutContext;
use TYPO3\CMS\Backend\View\PageLayoutView;
use TYPO3\CMS\Core\EventDispatcher\EventDispatcher;
use TYPO3\CMS\Core\Type\Bitmask\Permission;
use TYPO3\CMS\Core\Utility\GeneralUtility;
......@@ -239,26 +238,14 @@ class GridColumn extends AbstractGridObject
public function getBeforeSectionMarkup(): string
{
$event = new BeforeSectionMarkupGeneratedEvent(
PageLayoutView::createFromPageLayoutContext($this->context),
$this->context->getSiteLanguage()->getLanguageId(),
$this->definition,
$this->context,
$this->getRecords()
);
$event = new BeforeSectionMarkupGeneratedEvent($this->definition, $this->context, $this->getRecords());
$this->eventDispatcher->dispatch($event);
return $event->getContent();
}
public function getAfterSectionMarkup(): string
{
$event = new AfterSectionMarkupGeneratedEvent(
PageLayoutView::createFromPageLayoutContext($this->context),
$this->context->getSiteLanguage()->getLanguageId(),
$this->definition,
$this->context,
$this->getRecords()
);
$event = new AfterSectionMarkupGeneratedEvent($this->definition, $this->context, $this->getRecords());
$this->eventDispatcher->dispatch($event);
return $event->getContent();
}
......
......@@ -19,20 +19,9 @@ namespace TYPO3\CMS\Backend\View\Event;
use Psr\EventDispatcher\StoppableEventInterface;
use TYPO3\CMS\Backend\View\PageLayoutContext;
use TYPO3\CMS\Backend\View\PageLayoutView;
abstract class AbstractSectionMarkupGeneratedEvent implements StoppableEventInterface
{
/**
* @deprectaed will be removed in v12
*/
private PageLayoutView $pageLayoutView;
/**
* @deprecated will be removed in v12
*/
private int $languageId;
private array $columnConfig;
private PageLayoutContext $pageLayoutContext;
private array $records;
......@@ -40,48 +29,13 @@ abstract class AbstractSectionMarkupGeneratedEvent implements StoppableEventInte
private string $content = '';
private bool $stopRendering = false;
public function __construct(
PageLayoutView $pageLayoutView,
int $languageId,
array $columnConfig,
PageLayoutContext $pageLayoutContext,
array $records
) {
$this->pageLayoutView = $pageLayoutView;
$this->languageId = $languageId;
public function __construct(array $columnConfig, PageLayoutContext $pageLayoutContext, array $records)
{
$this->columnConfig = $columnConfig;
$this->pageLayoutContext = $pageLayoutContext;
$this->records = $records;
}
/**
* @return PageLayoutView
* @deprecated will be removed in v12
*/
public function getPageLayoutView(): PageLayoutView
{
trigger_error(
__METHOD__ . ' is deprecated and will be removed in TYPO3 v12. Use the PageLayoutContext instead.',
E_USER_DEPRECATED
);
return $this->pageLayoutView;
}
/**
* @return int
* @deprecated will be removed in v12
*/
public function getLanguageId(): int
{
trigger_error(
__METHOD__ . ' is deprecated and will be removed in TYPO3 v12. Fetch the language via the PageLayoutContext instead.',
E_USER_DEPRECATED
);
return $this->languageId;
}
public function getColumnConfig(): array
{
return $this->columnConfig;
......
......@@ -61,6 +61,8 @@ The following PHP class methods that have previously been marked as deprecated f
- :php:`\TYPO3\CMS\Backend\Domain\Module\BackendModule->getNavigationFrameScriptParameters()`
- :php:`\TYPO3\CMS\Backend\Domain\Module\BackendModule->setOnClick()`
- :php:`\TYPO3\CMS\Backend\Domain\Module\BackendModule->getOnClick()`
- :php:`\TYPO3\CMS\Backend\View\Event\AbstractSectionMarkupGeneratedEvent->getPageLayoutView()`
- :php:`\TYPO3\CMS\Backend\View\Event\AbstractSectionMarkupGeneratedEvent->getLanguageId()`
- :php:`\TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools->getArrayValueByPath()`
- :php:`\TYPO3\CMS\Core\Configuration\FlexForm\FlexFormTools->setArrayValueByPath()`
- :php:`\TYPO3\CMS\Core\Database\ReferenceIndex->disableRuntimeCache()`
......
......@@ -5039,6 +5039,7 @@ return [
'maximumNumberOfArguments' => 0,
'restFiles' => [
'Deprecation-95261-PublicMethodsInSectionMarkupGeneratedEvents.rst',
'Breaking-96107-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Backend\View\Event\AbstractSectionMarkupGeneratedEvent->getLanguageId' => [
......@@ -5046,6 +5047,7 @@ return [
'maximumNumberOfArguments' => 0,
'restFiles' => [
'Deprecation-95261-PublicMethodsInSectionMarkupGeneratedEvents.rst',
'Breaking-96107-DeprecatedFunctionalityRemoved.rst',
],
],
'TYPO3\CMS\Core\Database\RelationHandler->remapMM' => [
......
Markdown is supported
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