Exemplo n.º 1
0
 protected function createComponentFormAdd()
 {
     if ($this->user->isInRole('administrator')) {
         $form = $this->formFactory->create($this->model, $this->userModel->activeUsersAsArray());
     } else {
         $form = $this->formFactory->create($this->model, $this->userModel->listedUsersAsArray(array($this->user->id)));
     }
     $form->onSuccess[] = array($this, 'addFormSucceeded');
     return $form;
 }