Skip to content

Commit

Permalink
!feat: provide public readonly properties in ComponentWillBeRendered …
Browse files Browse the repository at this point in the history
…event

BREAKING CHANGE: The getContentObjectRenderer() and getComponentRenderingData() are removed. Use the public properties instead.
  • Loading branch information
smichaelsen committed Aug 3, 2024
1 parent d158f6a commit 74bdbef
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions Classes/Dto/Events/ComponentWillBeRendered.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,8 @@
class ComponentWillBeRendered
{
public function __construct(
private readonly ContentObjectRenderer $contentObjectRenderer,
private readonly ComponentRenderingData $componentRenderingData,
public readonly ContentObjectRenderer $contentObjectRenderer,
public readonly ComponentRenderingData $componentRenderingData,
) {
}

public function getContentObjectRenderer(): ContentObjectRenderer
{
return $this->contentObjectRenderer;
}

public function getComponentRenderingData(): ComponentRenderingData
{
return $this->componentRenderingData;
}
}

0 comments on commit 74bdbef

Please sign in to comment.