Source for file HTMLLabel.class.php
Documentation is available at HTMLLabel.class.php
* Note: If you include a html form, you don't need to include any form item
* classes! They will be all included.
* For including this file you have to define the constant "CLASSPATH".
* Because every include in the framework depends on the CLASSPATH definition.
* The CLASSPATH means the relative path to the folder that contains the
echo "<h3>You have to define the constant CLASSPATH!</h3>\n";
echo "Example: define( 'CLASSPATH', '../path/to/classes/' );\n";
* Including the basic class for html-tags.
require_once( CLASSPATH. "html/ABSTHTMLTag.class.php" );
* Creating HTML-Label-Tags
* @author Daniel Plücken <daniel@debakel.net>
* @license http://www.gnu.org/copyleft/lesser.html
* GNU Lesser General Public License
* @copyright Copyright (C) 2006 Daniel Plücken <daniel@debakel.net>
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License.
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General
* Public License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA
* Reference back to the form item this label stnds for.
* @var ABSTHTMLFormItem $form_item_obj
* The content of this label.
* @author Daniel Plücken <daniel@debakel.net>
* @param string $str_body
* @param string $str_style_class
function HTMLLabel( $str_body, $str_style_class = "" )
if ( !empty( $str_style_class ) )
* Sets the body of this HTML-Object.
* @author Daniel Plücken <daniel@debakel.net>
{ $thi->str_body = $string; }
* Adds this label to a specified form item.
* @author Daniel Plücken <daniel@debakel.net>
* @param ABSTHTMLFormItem $form_item_obj
get_class( $form_item_obj ) == "absthtmlformitem"
$form_item_obj->label_obj = & $this;
is_a( $form_item_obj, "ABSTHTMLFormItem" )
$form_item_obj->label_obj = & $this;
* Returns a generated string based on the Attributes of this HTML-Object.
* @author Daniel Plücken <daniel@debakel.net>
? " id=\"". $this->id. "\"\r\n"
? " name=\"". $this->name. "\"\r\n"
} // End of class HTMLLabel
|