7 * LICENSE: This source file is licensed under the terms of the GNU General Public License.
9 * @package Magic3 Framework
10 * @author 平田直毅(Naoki Hirata) <naoki@aplo.co.jp>
11 * @copyright Copyright 2006-2012 Magic3 Project.
12 * @license http://www.gnu.org/copyleft/gpl.html GPL License
13 * @version SVN: $Id: admin_ec_menuBaseWidgetContainer.php 5562 2013-01-18 03:49:58Z fishbone $
14 * @link http://www.magic3.org
16 require_once($gEnvManager->getContainerPath() . '/baseAdminWidgetContainer.php');
18 class admin_ec_menuBaseWidgetContainer extends BaseAdminWidgetContainer
20 const DEFAULT_TASK = 'menudef';
25 function __construct()
28 parent::__construct();
33 * _setTemplate()で指定したテンプレートファイルにデータを埋め込む。
35 * @param RequestManager $request HTTPリクエスト処理クラス
36 * @param object $param 任意使用パラメータ。_setTemplate()と共有。
39 function _postAssign($request, &$param)
42 $openBy = $request->trimValueOf(M3_REQUEST_PARAM_OPEN_BY); // ウィンドウオープンタイプ
43 if (!empty($openBy)) $this->addOptionUrlParam(M3_REQUEST_PARAM_OPEN_BY, $openBy);
46 $task = $request->trimValueOf(M3_REQUEST_PARAM_OPERATION_TASK);
47 if (empty($task)) $task = self::DEFAULT_TASK; // デフォルト画面を設定
51 case 'menudef': // メニュー定義
52 case 'menudef_detail': // メニュー定義詳細
53 $linkList = ' >> メニュー定義';// パンくずリスト
56 $linkList = ' >> その他';// パンくずリスト
60 // ####### 上段メニューの作成 #######
61 $menuText = '<div id="configmenu-upper">' . M3_NL;
62 $menuText .= '<ul>' . M3_NL;
65 $baseUrl = $this->getAdminUrlWithOptionParam(true);// 画面定義ID付き
69 $link = $this->getUrl($baseUrl . '&task=menudef');
70 if ($task == 'menudef' ||
71 $task == 'menudef_detail'){
72 $current = 'id="current"';
74 $menuText .= '<li ' . $current . '><a href="'. $this->convertUrlToHtmlEntity($link) .'"><span>メニュー定義</span></a></li>' . M3_NL;
78 $link = $this->getUrl($baseUrl . '&task=other');
79 if ($task == 'other'){ // その他設定
80 $current = 'id="current"';
82 $menuText .= '<li ' . $current . '><a href="'. $this->convertUrlToHtmlEntity($link) .'"><span>その他</span></a></li>' . M3_NL;
85 $menuText .= '</ul>' . M3_NL;
86 $menuText .= '</div>' . M3_NL;
89 $linkList = '<div id="configmenu-top"><label>' . '商品メニュー' . $linkList . '</label></div>';
90 $outputText .= '<table width="90%"><tr><td>' . $linkList . $menuText . '</td></tr></table>' . M3_NL;
91 $this->tmpl->addVar("_widget", "menu_items", $outputText);