[xoops-cvslog 3865] CVS update: xoops2jp/html/modules/base/admin/forms

Back to archive index

Minahito minah****@users*****
2006年 8月 2日 (水) 18:36:48 JST


Index: xoops2jp/html/modules/base/admin/forms/ThemeSelectForm.class.php
diff -u /dev/null xoops2jp/html/modules/base/admin/forms/ThemeSelectForm.class.php:1.1.2.1
--- /dev/null	Wed Aug  2 18:36:48 2006
+++ xoops2jp/html/modules/base/admin/forms/ThemeSelectForm.class.php	Wed Aug  2 18:36:48 2006
@@ -0,0 +1,63 @@
+<?php
+/**
+ * @package Legacy
+ * @version $Id: ThemeSelectForm.class.php,v 1.1.2.1 2006/08/02 09:36:48 minahito Exp $
+ */
+
+if (!defined('XOOPS_ROOT_PATH')) exit();
+
+require_once XOOPS_ROOT_PATH . "/class/XCube_ActionForm.class.php";
+
+/**
+ * This class is generated by makeActionForm tool.
+ */
+class Legacy_ThemeSelectForm extends XCube_ActionForm
+{
+	function getTokenName()
+	{
+		return "module.base.ThemeSelectForm.TOKEN";
+	}
+
+	function prepare()
+	{
+		//
+		// Set form properties
+		//
+		$this->mFormProperties['select'] =& new XCube_BoolArrayProperty('select');
+		$this->mFormProperties['choose'] =& new XCube_StringArrayProperty('choose');
+	}
+
+	/**
+	 * @access public
+	 */
+	function getChooseTheme()
+	{
+		foreach ($this->get('choose') as $dirname => $dmy) {
+			return $dirname;
+		}
+		
+		return null;
+	}
+	
+	function getSelectableTheme()
+	{
+		$ret = array();
+		
+		foreach ($this->get('select') as $themeName => $isSelect) {
+			if ($isSelect == 1) {
+				$ret[] = $themeName;
+			}
+		}
+		
+		return $ret;
+	}
+	
+	function load(&$themeArr)
+	{
+		foreach ($themeArr as $themeName) {
+			$this->set('select', $themeName, 1);
+		}
+	}
+}
+
+?>


xoops-cvslog メーリングリストの案内
Back to archive index