Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected function createComponentAddUserForm($name)
- {
- $form = new AppForm($this, $name);
- $form->...
- $defaults = $this->model->find($this->id);
- $form->setDefaults($defaults);
- // ...
- }
- public function AddUserFormSubmit($form)
- {
- if (!$user->inRole('admin')) {
- throw new BadRequestException();
- }
- // ...
- }
- // ...
- {if $user->inRole('admin')}
- {control addUserForm}
- {/if}
Advertisement
Add Comment
Please, Sign In to add comment