$items = $model->B->C; //where B,C are relations - basically just a relation of a relation
Anyways, I just want to know how to sort the values in $items. I went to the model file in C and added the following into the search method’s dataprovider return value:
'sort'=>array(
'defaultOrder'=>'attribute X', //tried ASC and DESC
)
but that didn’t change the order at all. Any help is appreciated, thanks.
That didn’t seem to work. Just to clarify, B is a relation from another model, and C is a relation from yet another model. So $model->(relation between A and B )->(relation between B and C)