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