public function testMakeDataProviderBySearchAttributeData()
 {
     $role = Role::getById(self::$roleId);
     $searchAttributeData = UsersByModelModalListControllerUtil::makeModalSearchAttributeDataByModel($role, 'role');
     $dataProvider = UsersByModelModalListControllerUtil::makeDataProviderBySearchAttributeData($searchAttributeData);
     $this->assertTrue($dataProvider instanceof RedBeanModelDataProvider);
     $data = $dataProvider->getData();
     $this->assertEquals(1, count($data));
     $this->assertEquals($role->id, $data[0]->role->id);
 }
 public function actionUsersInGroupModalList($id)
 {
     $model = Group::getById((int) $id);
     ControllerSecurityUtil::resolveAccessCanCurrentUserReadModel($model);
     $searchAttributeData = UsersByModelModalListControllerUtil::makeModalSearchAttributeDataByModel($model, 'groups');
     $dataProvider = UsersByModelModalListControllerUtil::makeDataProviderBySearchAttributeData($searchAttributeData);
     Yii::app()->getClientScript()->setToAjaxMode();
     echo UsersByModelModalListControllerUtil::renderList($this, $dataProvider, 'usersInGroupModalList');
 }