summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a76fe6e)
raw | patch | inline | side by side (parent: a76fe6e)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 27 Sep 2010 13:37:40 +0000 (13:37 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 27 Sep 2010 13:37:40 +0000 (13:37 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19803 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_TemplateWidget.inc
index d686439c19832711746d834c7640ec277db9fbcc..ef4ff99d68dd32a694f65e716f8a1bd5c6dfbb99 100644 (file)
<?php
+/*! \brief The base class for all template-widgets used by the
+ * device-configuration class.
+ */
class TemplateWidget
{
protected $name = "unnamed";
protected $type = "";
protected $display = "";
+ /*! \brief Constructs the template widget and sets the default values.
+ * @param Config The GOsa configuration object.
+ * @param String A name for the widget.
+ * @param String The initial value.
+ * @param String A description.
+ * @param String True/False Must-Value/Optional-Value.
+ * @param String The widget type.
+ * @param String A display name for the widget.
+ */
function __construct(&$config, $name, $value, $description,$required,$type,$display)
{
$this->config = &$config;
$class = get_class();
$this->postName = "{$class}_{$this->name}";
}
-
+
+
+ /*! \brief Returns the display-name for the current widget.
+ * @return String The display-name for the widget, this
+ * name will usually be rendered infront of input fields.
+ */
function getDisplayName()
{
return($this->display);
}
+ /*! \brief Generates the HTML code for the widget.
+ * @return The HTML content for the widget.
+ */
function render()
{
return("");
}
+
+ /*! \brief Keep track of posted values.
+ */
function save_object()
{
if(isset($_POST[$this->postName])){
}
}
+
+ /*! \brief Returns the current value.
+ * @return Mixed The widgets value.
+ */
function getValue()
{
return($this->value);
}
+
+ /*! \brief Returns the name of the widget.
+ * @param String The widgets name.
+ */
function getName()
{
return($this->name);
}
+
+ /*! \brief Sets a new value for the widget.
+ * @param String The new value.
+ */
function setValue($value)
{
$this->value = $value;
}
-
}
-
?>