Simple CActiveDataProvider question

Hi all,

I am trying out this Multilingual extension

it says :




//inside post controller, list action

$posts = Post::model()->localized()->findAll($criteria);



but in my controller list it is this :




$dataProvider=new CActiveDataProvider('Post', array(

  'sort'=>false,

  'criteria'=>array(

    'order'=>'SortOrder ASC',

   ),

  )

);



How to write the code so $dataProvider = $posts?

I tried extending CActiveDataProvider like this :

this but its not working and gets very confusing.

Thanks

You mean something like this?




$dataProvider=new CActiveDataProvider(Post::model()->localized(), array(

  'sort'=>false,

  'criteria'=>array(

    'order'=>'SortOrder ASC',

   ),

  )

);



Oh boy I overlooked the same topic of the extension. The answer is right there

Sorry for the trouble. Thanks anyway.