Skip to content

Instantly share code, notes, and snippets.

@davidwindell
Created July 5, 2012 11:37
Show Gist options
  • Save davidwindell/3053220 to your computer and use it in GitHub Desktop.
Save davidwindell/3053220 to your computer and use it in GitHub Desktop.
use DoctrineORMModule\Form\Annotation\AnnotationBuilder;
$entity = new \Application\Entity\Account;
$builder = new AnnotationBuilder($this->getServiceLocator()->get('doctrine.entitymanager.orm_default'));
$infoForm = $builder->createForm($entity);
Results:
Fatal error: Call to undefined method Doctrine\ORM\Mapping\Column::getLength() in /home/david/domains/public_html/vendor/doctrine/doctrine-orm-module/src/DoctrineORMModule/Form/Annotation/ElementAnnotationsListener.php on line 225
<?php
namespace Application\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Application\Entity\Account
*
* @ORM\Table(name="Account")
* @ORM\Entity
*/
class Account
{
/**
* @var integer $accountid
*
* @ORM\Column(name="AccountID", type="integer", precision=0, scale=0, nullable=false, unique=false)
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
private $accountid;
/**
* @var string $url
*
* @ORM\Column(name="Url", type="string", length=255, precision=0, scale=0, nullable=false, unique=false)
*/
private $url;
/**
* @var string $customdomain
*
* @ORM\Column(name="CustomDomain", type="string", length=255, precision=0, scale=0, nullable=true, unique=false)
*/
private $customdomain;
/**
* Get accountid
*
* @return integer
*/
public function getAccountid()
{
return $this->accountid;
}
/**
* Set url
*
* @param string $url
* @return Account
*/
public function setUrl($url)
{
$this->url = $url;
return $this;
}
/**
* Get url
*
* @return string
*/
public function getUrl()
{
return $this->url;
}
/**
* Set customdomain
*
* @param string $customdomain
* @return Account
*/
public function setCustomdomain($customdomain)
{
$this->customdomain = $customdomain;
return $this;
}
/**
* Get customdomain
*
* @return string
*/
public function getCustomdomain()
{
return $this->customdomain;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment