1
我在Symfony 1,4中生成管理员。我在那里DoctrineChoice。我想设置这个列表在action.class.php中选择。如何在后台窗体中设置默认值?
我复制executeNew到action.class.php,但我不能在加载页面上设置默认值。
$this->form = $this->configuration->getForm();
$this->news = $this->form->getObject();
$this->form['author_id']->getWidget()->setOption('choices', '2');
不起作用。这可能吗?