Sulu\Bundle\ContactBundle\Entity\EmailType::setId PHP Method

setId() public method

To force id = 1 in load fixtures.
public setId ( integer $id )
$id integer
    public function setId($id)
    {
        $this->id = $id;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * @Given the email type :type exists
  */
 public function theEmailTypeExists($type)
 {
     $emailType = new EmailType();
     $emailType->setId(self::$emailTypeId);
     self::$emailTypeId += 1;
     $emailType->setName($type);
     $this->getEntityManager()->persist($emailType);
     $this->getEntityManager()->flush();
 }
All Usage Examples Of Sulu\Bundle\ContactBundle\Entity\EmailType::setId