/**
  * プット先コミュニティ選択画面表示
  */
 function getDefaultView()
 {
     $context = $this->getContext();
     $controller = $context->getController();
     $request = $context->getRequest();
     $user = $context->getUser();
     $acs_user_info_row = $user->getAttribute('acs_user_info_row');
     // 対象となるユーザコミュニティIDを取得
     $user_community_id = $request->ACSgetParameter('id');
     // 対象となるフォルダIDを取得
     $target_folder_id = $request->ACSgetParameter('folder_id');
     // 他ユーザのデータが見えないようチェック
     if (!$this->get_execute_privilege()) {
         // このページへアクセスすることはできません。
         $controller->forward(SECURE_MODULE, SECURE_ACTION);
         return;
     }
     // ユーザ情報
     $target_user_info_row = ACSUser::get_user_info_row_by_user_community_id($user_community_id);
     // マイコミュニティ
     $community_row_array = ACSUser::get_community_row_array($user_community_id);
     // マイコミュニティのフォルダツリーを追加
     $community_folder_obj_array = array();
     $community_row_index = 0;
     foreach ($community_row_array as $community_row) {
         $community_folder_obj = array();
         $folder_tree = array();
         // ルートフォルダのインスタンス生成
         $community_folder_obj = new ACSCommunityFolder($community_row['community_id'], $acs_user_info_row, '');
         $folder_tree = $community_folder_obj->get_folder_tree();
         $community_row_array[$community_row_index]['folder_tree'] = $folder_tree;
         $community_row_index++;
     }
     // プット先コミュニティ(設定されているコミュニティ)
     $put_community_row_array = ACSFolderModel::select_put_community($target_folder_id);
     // set
     $request->setAttribute('target_user_info_row', $target_user_info_row);
     $request->setAttribute('target_folder_id', $target_folder_id);
     $request->setAttribute('community_row_array', $community_row_array);
     $request->setAttribute('put_community_row_array', $put_community_row_array);
     return View::INPUT;
 }
 /**
  * コミュニティの全フォルダ取得
  *
  * @param $community
  */
 static function select_all_community_folder_row_array($community_id)
 {
     static $cache_rows;
     if (is_array($cache_rows[$community_id])) {
         return $cache_rows[$community_id];
     }
     $all_community_row_array = array();
     $sql_where = "folder.community_id = " . $community_id;
     $row_array = ACSFolderModel::select_common_folder_row_array($sql_where);
     foreach ($row_array as $row) {
         $row_tmp = array();
         $trusted_community_row_array = array();
         $row_tmp = $row;
         /* 閲覧許可コミュニティをセット */
         $trusted_community_row_array = ACSFolderModel::select_trusted_community($row['folder_id']);
         $row_tmp['trusted_community_row_array'] = $trusted_community_row_array;
         /* プット先コミュニティをセット */
         $put_community_row_array = ACSFolderModel::select_put_community($row['folder_id']);
         $row_tmp['put_community_row_array'] = $put_community_row_array;
         array_push($all_community_row_array, $row_tmp);
     }
     $cache_rows[$community_id] = $all_community_row_array;
     return $all_community_row_array;
 }