sonata-project/SonataAdminBundle — Issue #442: configureShowFields or configureShowField ?
Author: sushicodeur
Created: 2011-12-07 10:28:27+00:00
State: open

In the samples (for example here : https://github.com/sonata-project/SonataAdminBundle/blob/master/README.md) we are told to create a function "configureShowFields" like this

public function configureShowFields(ShowMapper $showMapper)

I tried this but always got a blank view (no data shows at all).

In the base Admin class, it looks like configureShowField (with no 's' at the end) is called :

https://github.com/sonata-project/SonataAdminBundle/blob/master/Admin/Admin.php#L553

So I defined my method like this in my Admin class :

public function configureShowField(ShowMapper $showMapper)

And got my view to work fine.

It looks like there is a typo somewhere, but is it in the doc or the code of the base Admin class ?