Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

object of class symfonycomponentformformview could not be converted to string

//You need to implement the __toString() method in the Entreprise entity

namespace AppEntity;

use DoctrineCommonCollectionsArrayCollection;
use DoctrineCommonCollectionsCollection;
use DoctrineORMMapping as ORM;

/**
 * @ORMEntity(repositoryClass="AppRepositoryEntrepriseRepository")
 */
class Entreprise
{
    //...

    public function __toString()
    {
        return $this->entreprise_nom;
    }

    // ...
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #object #class #symfonycomponentformformview #converted #string
ADD COMMENT
Topic
Name
8+6 =