public function __construct($groupId) { parent::__construct(); $this->groupId = $groupId; $urlStatic = OW::getPluginManager()->getPlugin('gheader')->getStaticUrl(); OW::getDocument()->addScript($urlStatic . 'gheader.js'); OW::getDocument()->addStyleSheet($urlStatic . 'gheader.css'); OW::getLanguage()->addKeyForJs('gheader', 'delete_cover_confirmation'); OW::getLanguage()->addKeyForJs('gheader', 'my_photos_title'); $this->service = GHEADER_BOL_Service::getInstance(); $this->groupService = GROUPS_BOL_Service::getInstance(); $this->group = $this->groupService->findGroupById($this->groupId); }
public function onUpdateInfo(OW_Event $event) { $params = $event->getParams(); $data = $event->getData(); if ($params["entityType"] != self::ENTITY_TYPE) { return; } foreach ($data as $groupId => $info) { $group = $this->service->findGroupById($groupId); $group->status = $info["status"]; $this->service->saveGroup($group); } }
public function privateGroup($params) { $language = OW::getLanguage(); $this->setPageTitle($language->text('groups', 'private_page_title')); $this->setPageHeading($language->text('groups', 'private_page_heading')); $this->setPageHeadingIconClass('ow_ic_lock'); $groupId = $params['groupId']; $group = $this->service->findGroupById($groupId); $avatarList = BOL_AvatarService::getInstance()->getDataForUserAvatars(array($group->userId)); $displayName = BOL_UserService::getInstance()->getDisplayName($group->userId); $userUrl = BOL_UserService::getInstance()->getUserUrl($group->userId); $this->assign('group', $group); $this->assign('avatar', $avatarList[$group->userId]); $this->assign('displayName', $displayName); $this->assign('userUrl', $userUrl); $this->assign('creator', $language->text('groups', 'creator')); }