2 // $Id: CommunityLinkSuccessView.class.php,v 1.1 2006/03/07 07:35:16 w-ota Exp $
4 class CommunityLinkSuccessView extends BaseView
7 $context = $this->getContext();
8 $controller = $context->getController();
9 $request = $context->getRequest();
10 $user = $context->getUser();
11 $acs_user_info_row = $user->getAttribute('acs_user_info_row');
14 $community_row = $request->getAttribute('community_row');
15 $sub_community_row_array = $request->getAttribute('sub_community_row_array');
16 $parent_community_row_array = $request->getAttribute('parent_community_row_array');
17 $community_id = $community_row['community_id'];
20 foreach ($parent_community_row_array as $index => $parent_community_row) {
21 $parent_community_row_array[$index]['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $parent_community_row['community_id'];
22 $parent_community_row_array[$index]['delete_community_link_url'] = $this->getControllerPath('Community', 'DeleteCommunityLink') . '&community_id=' . $community_row['community_id'] . '&delete_community_id=' . $parent_community_row['community_id'] . '&mode=parent';
25 foreach ($sub_community_row_array as $index => $sub_community_row) {
26 $sub_community_row_array[$index]['top_page_url'] = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $sub_community_row['community_id'];
27 $sub_community_row_array[$index]['delete_community_link_url'] = $this->getControllerPath('Community', 'DeleteCommunityLink') . '&community_id=' . $community_row['community_id'] . '&delete_community_id=' . $sub_community_row['community_id'] . '&mode=sub';
30 // ¥³¥ß¥å¥Ë¥Æ¥£¥È¥Ã¥×¥Ú¡¼¥¸¤ÎURL
31 $community_top_page_url = $this->getControllerPath('Community', DEFAULT_ACTION) . '&community_id=' . $community_row['community_id'];
33 // ¥³¥ß¥å¥Ë¥Æ¥£´Ö¥ê¥ó¥¯ÄɲÃURL
34 $add_community_link_url = $this->getControllerPath('Community', 'AddCommunityLink') . '&community_id=' . $community_id;
37 $this->setAttribute('community_row', $community_row);
38 $this->setAttribute('parent_community_row_array', $parent_community_row_array);
39 $this->setAttribute('sub_community_row_array', $sub_community_row_array);
41 $this->setAttribute('community_top_page_url', $community_top_page_url);
42 $this->setAttribute('add_community_link_url', $add_community_link_url);
45 $this->setScreenId("0001");
46 $this->setTemplate('CommunityLink.tpl.php');
48 return parent::execute();