public function contactAction(Request $request) { $da = $this->container->get('we_data_access'); $this->userName = $request->get("account"); $user = $this->getUserInfo($this->userName); if (empty($user)) { return $this->render('JustsyBaseBundle:EmployeeCard:contact_card.html.twig', array("userName" => $this->userName)); } $this->photo_url = $this->container->getParameter('FILE_WEBSERVER_URL') . $user["photo_path_big"]; $user["dept_name"] = $user["dept_name"] == null ? "[未设置部门]" : $user["dept_name"]; $this->user = $user; $this->userName = $user["login_account"]; $this->network_domain = $request->get("network_domain"); $level = \Justsy\BaseBundle\Common\ExperienceLevel::getLevel($user["total_point"]); $level = (int) ($level / 10); $staffMgr = new \Justsy\BaseBundle\Management\Staff($da, null, $this->userName, $this->get("logger")); $tag = $staffMgr->getTag(); $staff_pref = \Justsy\BaseBundle\Business\WeStaff::getPreference($da, $user["login_account"]); return $this->render('JustsyBaseBundle:EmployeeCard:contact_card.html.twig', array('this' => $this, 'tag' => $tag, 'css_level' => $level, 'staff_pref' => $staff_pref)); }