Skip to content

Commit

Permalink
Issue #23 Fix docs for $event->sender
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehaertl committed Apr 10, 2018
1 parent cc63820 commit 7e61c88
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ Property | Description

Event | Description
---------|-------------
`beforeRender` | Triggered before the sheet is rendered. The sheet is available via `$event->source->getSheet()`.
`afterRender` | Triggered after the sheet was rendered. The sheet is available via `$event->source->getSheet()`.
`beforeRender` | Triggered before the sheet is rendered. The sheet is available via `$event->sender->getSheet()`.
`afterRender` | Triggered after the sheet was rendered. The sheet is available via `$event->sender->getSheet()`.


### ActiveExcelSheet
Expand Down Expand Up @@ -302,7 +302,7 @@ $file = \Yii::createObject([

### Events

Since version 2.3.5 there are new events which make it easier to further modify each sheet.
Since version 2.5.0 there are new events which make it easier to further modify each sheet.

```php
<?php
Expand All @@ -314,7 +314,7 @@ $file = \Yii::createObject([
'query' => User::find(),
'startRow' => 3,
'on beforeRender' => function ($event) {
$sheet = $event->source->getSheet();
$sheet = $event->sender->getSheet();
$sheet->setCellValue('A1', 'List of current users');
}
],
Expand Down

0 comments on commit 7e61c88

Please sign in to comment.