/**
  * {@inheritdoc}
  */
 public function buildCreation()
 {
     $this->bill->setCreation(new \DateTime());
 }
 /**
  * {@inheritdoc}
  */
 protected function assertPreConditions()
 {
     $this->assertInstanceOf('JLM\\CommerceBundle\\Model\\BillInterface', $this->entity);
     $this->assertNull($this->entity->getId());
 }
 public function assertState(Bill $bill, $states = array())
 {
     if (!in_array($bill->getState(), $states)) {
         return $this->redirect('bill_show', array('id' => $bill->getId()));
     }
 }