سؤال

is there a way to check inside the form class in symfony 1.3 whether it is new or not ? Tried the obvious way to check $this->isNew() but it gives an error. Thanks

هل كانت مفيدة؟

المحلول

If your using Doctrine then you could get the object and see if that is new :

$form->getObject()->isNew();
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top