/**
* @var array|\Closure the HTML attributes for the data cell tag. This can either be an array of
* attributes or an anonymous function that ([[Closure]]) that returns such an array.
* The signature of the function should be the following: `function ($model, $key, $index, $gridView)`.
* A function may be used to assign different attributes to different rows based on the data in that row.
*
* @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
*/
public $contentOptions = [];
$criteria->group='t.user_id';
'usersMotivation' => array(self::HAS_ONE, 'UsersMotivations', 'userID'),
И использовать тот же самый критерий$criteria = new CDbCriteria;
$criteria->with = array('usersMotivation');
$criteria->addInCondition('motivationID',array(1,2));
$criteria->together = true;