×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
Cannot filter model by state
Charalampos Kaklamanos
New Member
Posts: 1
10 年 3 个月 前 #292
由 Charalampos Kaklamanos
Cannot filter model by state was created by Charalampos Kaklamanos
Hello and thank you for this great compo.
I have created a basic component with 1 table. This table contains the default "state" field.
Then , in the frontend, I am loading my Model and apply filters in order to select certain rows from the table.
For example:
$model->setState('filter.receiver',954); //This filter is for the receiver field. So, only rows with receiver value of 954 are returned.
However, the following does not work.
$model->setState('filter.state',1);
In other word I need to return only the items that are Published (state=1).
Is this the default behavior or a bug.
I appreciate your help and I hope my issue is clear.
Thanks
Haris
I have created a basic component with 1 table. This table contains the default "state" field.
Then , in the frontend, I am loading my Model and apply filters in order to select certain rows from the table.
For example:
$model->setState('filter.receiver',954); //This filter is for the receiver field. So, only rows with receiver value of 954 are returned.
However, the following does not work.
$model->setState('filter.state',1);
In other word I need to return only the items that are Published (state=1).
Is this the default behavior or a bug.
I appreciate your help and I hope my issue is clear.
Thanks
Haris
Please 登录 或 注册一个帐号 to join the conversation.
创建页面时间:0.045秒