Skip to content

Commit

Permalink
Add missing parameter
Browse files Browse the repository at this point in the history
Maybe one should talk about the typehinting, as it's optional - for now it's in the second example while missing in the first. Hopefully that's obvious enough...
  • Loading branch information
hmic authored Sep 5, 2017
1 parent 3e522e3 commit 6d34bb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/_partials/fields/formatter-callable.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ only configure the settings for one or two.
$action = $this->Crud->action();
$action->config('scaffold.field_settings', [
'published_time' => [
'formatter' => function ($name, Time $value) {
'formatter' => function ($name, Time $value, Entity $entity) {
return $value->nice() . sprintf(' (Approved by %s)', $entity->approver->name);
}
],
Expand Down

0 comments on commit 6d34bb0

Please sign in to comment.