Ejemplo n.º 1
0
 private function addUserList(EVENTX_BOL_Event $event, $status)
 {
     $configs = $this->eventService->getConfigs();
     $language = OW::getLanguage();
     $listTypes = $this->eventService->getUserListsArray();
     $serviceConfigs = $this->eventService->getConfigs();
     $userList = $this->eventService->findEventUsers($event->getId(), $status, null, $configs[EVENTX_BOL_EventService::CONF_EVENTX_USERS_COUNT]);
     $usersCount = $this->eventService->findEventUsersCount($event->getId(), $status);
     $idList = array();
     foreach ($userList as $eventUser) {
         $idList[] = $eventUser->getUserId();
     }
     $usersCmp = new BASE_CMP_AvatarUserList($idList);
     $linkId = UTIL_HtmlTag::generateAutoId('link');
     $contId = UTIL_HtmlTag::generateAutoId('cont');
     $this->userLists[] = array('contId' => $contId, 'cmp' => $usersCmp->render(), 'bottomLinkEnable' => $usersCount > $serviceConfigs[EVENTX_BOL_EventService::CONF_EVENTX_USERS_COUNT], 'toolbarArray' => array(array('label' => $language->text('eventx', 'avatar_user_list_bottom_link_label', array('count' => $usersCount)), 'href' => OW::getRouter()->urlForRoute('eventx.user_list', array('eventId' => $event->getId(), 'list' => $listTypes[(int) $status])))));
     $this->userListMenu[] = array('label' => $language->text('eventx', 'avatar_user_list_link_label_' . $status), 'id' => $linkId, 'contId' => $contId, 'active' => sizeof($this->userListMenu) < 1 ? true : false);
 }