From 6d34bb0111b03dcfff74ff235f02d7a8082afa51 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Michl Date: Tue, 5 Sep 2017 15:50:18 +0200 Subject: [PATCH] Add missing parameter 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... --- docs/_partials/fields/formatter-callable.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/_partials/fields/formatter-callable.rst b/docs/_partials/fields/formatter-callable.rst index 15a1f816..22dd1985 100644 --- a/docs/_partials/fields/formatter-callable.rst +++ b/docs/_partials/fields/formatter-callable.rst @@ -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); } ],