Sonata在编辑/添加时显示不同的字段​(Different field options in configureFormFields)



protected function configureFormFields(FormMapper $form)
{
    // Add fields common to add AND edit...
  
    if ($this->getSubject()->getId() > 0) {
        // Add fields only when editing an existing object
    }
}



by 雪洁 2014-11-25 04:54:43 1490 views
我来说几句

相关文章