Skip to content

Commit

Permalink
unify some hook params
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzmg committed Nov 10, 2024
1 parent c2c1b91 commit e81d493
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions docs/dev/reference/hooks/getFrontendModule.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ a front end module.

3. *object* `$module`

An instance of the front end module's class that is registered for this module's
type.
An instance of the front end module's class that is registered for this module's type.


## Return Values
Expand All @@ -63,7 +62,7 @@ use Contao\ModuleModel;
#[AsHook('getFrontendModule')]
class GetFrontendModuleListener
{
public function __invoke(ModuleModel $model, string $buffer, $module): string
public function __invoke(ModuleModel $model, string $buffer, object $module): string
{
// Wrap a specific module in an additional wrapper div
if (2 === (int) $model->id) {
Expand Down
4 changes: 2 additions & 2 deletions docs/dev/reference/hooks/getPageLayout.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ and does not expect a return value.

## Parameters

1. *\Contao\PageModel* `$pageModel`
1. *\Contao\PageModel* `$page`

The page model instance.

Expand All @@ -43,7 +43,7 @@ use Contao\PageModel;
#[AsHook('getPageLayout')]
class GetPageLayoutListener
{
public function __invoke(PageModel $pageModel, LayoutModel $layout, PageRegular $pageRegular): void
public function __invoke(PageModel $page, LayoutModel $layout, PageRegular $pageRegular): void
{
// Modify the page or layout object
}
Expand Down

0 comments on commit e81d493

Please sign in to comment.