7 * LICENSE: This source file is licensed under the terms of the GNU General Public License.
9 * @package ポータル用コンテンツ更新情報
10 * @author 株式会社 毎日メディアサービス
11 * @copyright Copyright 2009-2012 株式会社 毎日メディアサービス.
12 * @license http://www.gnu.org/copyleft/gpl.html GPL License
13 * @version SVN: $Id: admin_portal_updateinfoOtherWidgetContainer.php 5171 2012-09-06 01:50:46Z fishbone $
14 * @link http://www.m-media.co.jp
16 require_once($gEnvManager->getCurrentWidgetContainerPath() . '/admin_portal_updateinfoBaseWidgetContainer.php');
17 require_once($gEnvManager->getContainerPath() . '/baseAdminWidgetContainer.php');
19 class admin_portal_updateinfoOtherWidgetContainer extends admin_portal_updateinfoBaseWidgetContainer
21 const DEFAULT_ITEM_COUNT = 10; // デフォルトの表示項目数
26 function __construct()
29 parent::__construct();
34 * _assign()でデータを埋め込むテンプレートファイルのファイル名を返す。
35 * 読み込むディレクトリは、「自ウィジェットディレクトリ/include/template」に固定。
37 * @param RequestManager $request HTTPリクエスト処理クラス
38 * @param object $param 任意使用パラメータ。そのまま_assign()に渡る
39 * @return string テンプレートファイル名。テンプレートライブラリを使用しない場合は空文字列「''」を返す。
41 function _setTemplate($request, &$param)
43 return 'admin_other.tmpl.html';
48 * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
50 * @param RequestManager $request HTTPリクエスト処理クラス
51 * @param object $param 任意使用パラメータ。_setTemplate()と共有。
54 function _assign($request, &$param)
56 $act = $request->trimValueOf('act');
57 if ($act == 'update'){ // 設定更新のとき
59 $itemCount = $request->valueOf('item_count'); // 表示項目数
61 if ($this->getMsgCount() == 0){ // エラーのないとき
62 $paramObj = new stdClass;
63 $paramObj->itemCount = $itemCount;
64 $ret = $this->updateWidgetParamObj($paramObj);
66 $this->setMsg(self::MSG_GUIDANCE, 'データを更新しました');
68 $this->setMsg(self::MSG_APP_ERR, 'データ更新に失敗しました');
70 $this->gPage->updateParentWindow();// 親ウィンドウを更新
74 $itemCount = self::DEFAULT_ITEM_COUNT; // 表示項目数
75 $paramObj = $this->getWidgetParamObj();
76 if (!empty($paramObj)){
77 $itemCount = $paramObj->itemCount;
82 $this->tmpl->addVar("_widget", "item_count", $itemCount);