sonata - Item "AdminBundle\Entity\Prize:000000046fa222" has been successfully created -


hi want sonata have item using 'name' label. not same.

i put in admin class

public function tostring($object) {     if (!is_object($object)) {         return '';     }     if (method_exists($object, '__tostring') && null !== $object->__tostring()) {         return (string) $object;     }      $cname = explode('\\', get_class($object));     return end($cname); } 

but give same name. want have label 'name' of each entity

you need override __tostring() magic method in entity class

public function __tostring(){     return $this->name;     } 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -