开发者

How Do I Filters the list by refModel('Model_user') in the Models?

开发者 https://www.devze.com 2023-02-28 01:15 出处:网络
I am unable to find how to filter the drown down which i got by using refmodel in my model which extends model_table

I am unable to find how to filter the drown down which i got by using refmodel in my model which extends model_table

开发者_如何学Go

thanks in advance


For any view in toolkit you can use setController and getController. refModel fields from Model will set a proper controller for a form field. It uses type reference.

Once form in initialized, you can interact with controller of a field by

$field->getField('myfield')->getController()->addCondition('type','admin');

Alternatively the following might work too:

$field->getField('myfield')->dictionary()->addCondition('type','admin');
0

精彩评论

暂无评论...
验证码 换一张
取 消