我在一个表单中有 4 个子表单,我想将其中的 2 个组合在一起,然后对它们应用一些装饰器。
这是我到目前为止所拥有的。w/在每个子表单中,我已经有一些显示组
$this->setSubForms(array(
'sub1' => $sub1,
'sub2' => $sub2,
'sub3' => $sub3,
'sub4' => $sub4
));
我以为我可以做类似的事情
$set1 = $this->setSubFormDecorators(array(
'sub1' => $sub1,
'sub2' => $sub2
));
$set1->setDecorator(array('something here'));
$set2 = $this->setSubFormDecorators(array(
'sub3' => $sub3,
'sub4' => $sub4
));
$set2->setDecorator(array('something here'));
显然这根本行不通。
我真的在 ZF 的文档中找不到任何东西。如果其他人遇到这个困境,我想我把它贴在这里。