在敏捷工具包框架中,当我添加CRUD对象时,是否可以指定在网格模式中哪些字段是可见的,哪些字段在编辑模式下是可见的?
我使用"setModel()“填充字段。例如。
$crud = $this->add("CRUD");
$crud->setModel("Foo");发布于 2013-10-08 16:12:15
CRUD ==网格+表单
因此,您希望在Grid中显示一组模型字段,以另一组形式显示。
$cr = $this->add('CRUD');
$cr->setModel('YourModel',
array('name','username','email','password'), <-- Form fields
array('name','email','password') <-- Grid fields
);https://github.com/atk4/atk4/blob/master/lib/View/CRUD.php#L218
https://stackoverflow.com/questions/19251730
复制相似问题