Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. <?php
  2. actionReadGroup($id) {
  3. if (!Yii::app()->user->checkAccess('readGroup', array(
  4. 'groupId' => $id,
  5. ))) {
  6. throw new
  7. };
  8. }
  9.  
  10. // БИЗНЕС ПРАВИЛО:
  11.  
  12. (bool) Yii::app()->db->createCommand("SELECT ...",)
  13. ->queryScalar(array(
  14. 'grp' => $params['groupId'],
  15. 'user' => $params['userId'],
  16. 'someData' => $data['foo'],
  17. ));
  18.  
  19. $rule = new ReadGroupRule($params, $data); $rule->check();
  20.  
  21. ReadGroupRule
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement