Пример #1
0
 protected function beforeStoreStatement(array &$response, array &$params, \GO\Base\Data\AbstractStore &$store, \GO\Base\Db\FindParams $storeParams)
 {
     $storeParams->joinModel(array('model' => 'GO\\Base\\Model\\UserGroup', 'localTableAlias' => 't', 'localField' => 'id', 'foreignField' => 'user_id', 'tableAlias' => 'ug'));
     $storeParams->group('t.id');
     $storeParams->export('users');
     $groupsMultiSel = new \GO\Base\Component\MultiSelectGrid('users-groups-panel', "GO\\Base\\Model\\Group", $store, $params, true);
     $groupsMultiSel->addSelectedToFindCriteria($storeParams, 'group_id', 'ug');
     return parent::beforeStoreStatement($response, $params, $store, $storeParams);
 }