Beispiel #1
0
 /**
  * The group list
  *
  */
 public function grouplistAction()
 {
     $model = $this->byId(null, 'UserGroup');
     if ($model == null) {
         $model = new UserGroup();
     }
     $this->view->model = $model;
     $this->view->groups = $this->groupService->getGroups();
     $this->renderView('admin/group-list.php');
 }
Beispiel #2
0
 /**
  * Override the edit action to supply some selectable relationships
  *
  * @param MappedObject $model
  */
 protected function prepareForEdit($model = null)
 {
     $clientid = $model && $model->clientid ? $model->clientid : (int) $this->_getParam('clientid');
     // check the existence of the client to add this contact to
     $client = $clientid ? $this->clientService->getClient($clientid) : null;
     // check the existence of the client to add this contact to
     $this->view->owners = $this->groupService->getGroups();
     $this->view->users = $this->userService->getUserList();
     $this->view->client = $client;
     $this->view->clients = $this->clientService->getClients();
     $this->view->projects = $clientid ? $this->projectService->getProjectsForClient($client) : array();
     parent::prepareForEdit($model);
 }