summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 9833d16)
raw | patch | inline | side by side (parent: 9833d16)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 28 Jun 2005 09:47:54 +0000 (09:47 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 28 Jun 2005 09:47:54 +0000 (09:47 +0000) |
plugins/gofon/macro/class_gofonMacro.inc | patch | blob | history | |
plugins/gofon/macro/class_gofonMacroParameters.inc | patch | blob | history |
index bba2898f7f0c39d5398382de777d39c362c18c7b..3f0ef4bde66c3e614154fc875660ff8c4b3a5ce1 100755 (executable)
<?php
+
+//! The Phone Macro Class: Handles Macro Contents, and some attributes.
+/*!
+ This class handles the basic information about phone macros, like
+ cn base description displayName goFonMacroContent goFonMacroVisible
+
+ This is not the only Class that manages phone Macros, there ist also the class_goFonMacroParameter.
+*/
class macro extends plugin
{
- /* CLI vars */
+ /*! CLI vars */
var $cli_summary= "Handling of GOsa's application object";
+ /*! CLI vars */
var $cli_description= "Some longer text\nfor help";
+ /*! CLI vars */
var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
- /* application attributes */
- var $cn= "";
- var $description= "";
- var $base= "";
- var $displayName = "";
- var $goFonMacroContent;
- var $goFonMacroVisible=0;
+ /*! Macro attributes, */
+
+ /*! The name of the Macro in the openldap drirectory */
+ var $cn = "";
+
+ /*! This ist the variable that contains the description of the macro*/
+ var $description = "";
- /* attribute list for save action */
- var $attributes= array("cn","base", "description","displayName","goFonMacroContent","goFonMacroVisible");
- var $objectclasses= array("top", "goFonMacro");
+ /*! The base of the macro, is used to save the macro in the correct directory tree */
+ var $base = "";
+ /*! This is the name of the macro which the enduser will see, instead of the cn */
+ var $displayName = "";
+
+ /*! Here is the macro content, the real macroscript */
+ var $goFonMacroContent= "";
- /*!
- Konstructor, load class with attributes of the given dn
- */
- function macro ($config, $dn= NULL)
+ /*! To allow user to use this macro this var must be true, else false * /
+ var $goFonMacroVisible= 0;
+
+ /*! attribute list for save action */
+ var $attributes = array("cn","base", "description","displayName","goFonMacroContent","goFonMacroVisible");
+
+ /*! Objectclasses that this calls handles */
+ var $objectclasses = array("top", "goFonMacro");
+
+ //! The Konstructor
+ /*! Konstructor, load class with attributes of the given dn*/
+ function macro::macro ($config, $dn= NULL)
{
plugin::plugin ($config, $dn);
}
}
- /*!
- Execute this plugin
- */
+ /*! Execute this plugin */
function execute()
{
/* Variables */
diff --git a/plugins/gofon/macro/class_gofonMacroParameters.inc b/plugins/gofon/macro/class_gofonMacroParameters.inc
index a6c328ac95f402806cad28e131272a09d4708f05..12d62343edd44cf9d2b7a788f3e6f93f3eede178 100755 (executable)
<?php
-
+//! This class handles the goFonMacroParameter
+/*! In this class all parameters from goFonMacroContent \n
+ and all (if given) already defined parameters are managed \n
+ \n
+ Parameters will be saved to openldap like this :\n
+ goFonMacroParameter: ID!NAME:!TYPE(string:combo:bool)!DEFAULT_VALUE\n
+ In Case of type=combo the DEFAULT_VALUE specifies the entries in the listbox, like this\n
+ "first:second:third:last" \n
+*/
class macroParameter extends plugin
{
- /* CLI vars */
+ /*! CLI vars */
var $cli_summary= "Handling of GOsa's application object";
+ /*! CLI vars */
var $cli_description= "Some longer text\nfor help";
+ /*! CLI vars */
var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser");
- /* application attributes */
+ /*! macro base */
var $base= "";
+
+ /*! This array contains all Parameter defined for the macro*/
var $goFonMacroParameter =array();
+
+ /*! This are the available types for a macro */
var $type_shortcut= array("string" => array("selected", "", ""),
"combo" => array("", "selected", ""),
"bool" => array("", "", "selected"));
- /* attribute list for save action */
+ /*! attribute list for save action */
var $attributes= array("base","goFonMacroParameter");
+
+ /*! Objectclasses needed by the class*/
var $objectclasses= array("top", "goFonMacro");
- /*!
- Konstructor
- */
+ //! The konstructor of macroParameter
+ /*! The konstructor of macroParameter...
+ - reads goFonMacroParameter and parses them to an array
+ - Set attributes from openldap (edit)
+ - Set attributes from default (new)
+ */
function macroParameter ($config, $dn= NULL)
{
plugin::plugin ($config, $dn);
$this->goFonMacroParameter = $tmp2;
}
- /*!
- Check given parameters from content and from object and compare them
+ //! Perform Parameter check
+ /*!
+ Compares the given parameters (goFonMacroParameters) with the parameters defined in goFonContent\n
+ -> Decide which attrs are new and which are unused\n
+ -> Sort result array (containing both parameters 'goFonMacroParameters/goFonContent' and new / unused info)\n
+ \param $content The given goFonContent for this macro\n
+ \param $goFonMacroParameter Array with the already given parameters \n
*/
function check_paras($content,$goFonMacroParameter)
{
}
-
+ //! Execute this Plugin
+ /*!
+ Perform Parameter check \n
+ Draw paramter table\n
+ Show tpl \n
+ */
function execute()
{
/* Variables */
/* Show main page */
return($smarty->fetch (get_template_path('parameter.tpl', TRUE)));
}
-
-
+
+ //! Unused here
+ /*!
+ Unused here because goFonMacro will remove this Macro\n
+ */
function remove_from_parent()
{
}
-
- /* Save data to object */
+ //! Save our data
+ /*!
+ Save POST data to object \n
+ This gives us the possibility to leave a tab, without losing our typed informations\n
+ \n
+ Read the POST fields for the parameters and saves their info the the class\n
+ */
function save_object()
{
if (isset($_POST['phoneparameters'])){
}
- /* Check values */
+ //! Checks given values
+ /*!
+ Check values\n
+ If a user enters an invalid value, then this function will output an error msg\n
+ (In better words :prepare the errormessages that will be put out )\n
+ */
function check()
{
$message = array();
return $message;
}
-
- /* Save to LDAP */
+ //! Save changes to openldap
+ /*!
+ Save to LDAP
+ This function saves given attributes to the ldap
+ */
function save()
{
/* Post checks */