Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法检查 symfony 1.3 中的表单类内部是否是新的?尝试了明显的检查方法,$this->isNew()但它给出了错误。谢谢
$this->isNew()
如果您使用 Doctrine,那么您可以获取该对象并查看它是否是新的:
$form->getObject()->isNew();