public function execute($request)
 {
     $treeObject = $this->getCompanyStructureService()->getSubunitTreeObject();
     $tree = new ohrmTreeViewComponent();
     $tree->getPropertyObject()->setTreeObject($treeObject);
     $this->tree = $tree;
 }
 public function execute($request)
 {
     $usrObj = $this->getUser()->getAttribute('user');
     if (!$usrObj->isAdmin()) {
         $this->redirect('pim/viewPersonalDetails');
     }
     $treeObject = $this->getCompanyStructureService()->getSubunitTreeObject();
     $tree = new ohrmTreeViewComponent();
     $tree->getPropertyObject()->setTreeObject($treeObject);
     $this->tree = $tree;
     $this->form = new SubunitForm();
 }
 public function execute($request)
 {
     $usrObj = $this->getUser()->getAttribute('user');
     if (!$usrObj->isAdmin()) {
         $this->redirect('pim/viewPersonalDetails');
     }
     $this->isOrganizationNameSet = false;
     $organization = $this->getOrganizationService()->getOrganizationGeneralInformation();
     if ($organization instanceof Organization && $organization->getName() != null) {
         $this->isOrganizationNameSet = true;
     }
     $treeObject = $this->getCompanyStructureService()->getSubunitTreeObject();
     $tree = new ohrmTreeViewComponent();
     $tree->getPropertyObject()->setTreeObject($treeObject);
     $this->tree = $tree;
     $this->form = new SubunitForm(array(), array(), true);
     $this->listForm = new DefaultListForm();
 }