私たちの Yii Framework アプリケーションには、 UserProfileImages モデルの一部として次のものが定義されています。
public function getProfileImages($param, $user_id) {
if(isset($param['select']) && $param['select']=='all'){
$profile_images = UserProfileImages::model()->findAllByAttributes( array( 'user_id'=>$user_id) );
} else {
$profile_images = UserProfileImages::model()->findByAttributes( array( 'user_id'=>$user_id) );
}
return $profile_images;
}
上記のスニペットをビュー内のウィジェットに接続して、特定のユーザーのすべての画像を返すにはどうすればよいですか?
おまけの質問: 上記をレンダリングするには、どの画像回転子をお勧めしますか?