/** * {@inheritdoc} */ protected function configureFormFields(FormMapper $formMapper) { $formMapper->ifTrue(!($this->hasSubject() && $this->getSubject()->getId() !== null))->add('id')->ifEnd()->add('name')->add('enabled', null, array('required' => false)); }
/** * @expectedException RuntimeException * @expectedExceptionMessage Cannot nest ifTrue or ifFalse call */ public function testIfFalseCombinationNested4() { $this->formMapper->ifTrue(false); $this->formMapper->ifFalse(true); }