2 /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
 
   5  * HTML class for a link type field
 
   9  * LICENSE: This source file is subject to version 3.01 of the PHP license
 
  10  * that is available through the world-wide-web at the following URI:
 
  11  * http://www.php.net/license/3_01.txt If you did not receive a copy of
 
  12  * the PHP License and are unable to obtain it through the web, please
 
  13  * send a note to license@php.net so we can mail you a copy immediately.
 
  16  * @package     HTML_QuickForm
 
  17  * @author      Adam Daniel <adaniel1@eesus.jnj.com>
 
  18  * @author      Bertrand Mansion <bmansion@mamasam.com>
 
  19  * @copyright   2001-2011 The PHP Group
 
  20  * @license     http://www.php.net/license/3_01.txt PHP License 3.01
 
  22  * @link        http://pear.php.net/package/HTML_QuickForm
 
  26  * HTML class for static data
 
  28 require_once 'HTML/QuickForm/static.php';
 
  31  * HTML class for a link type field
 
  34  * @package     HTML_QuickForm
 
  35  * @author      Adam Daniel <adaniel1@eesus.jnj.com>
 
  36  * @author      Bertrand Mansion <bmansion@mamasam.com>
 
  37  * @version     Release: 3.2.16
 
  40 class HTML_QuickForm_link extends HTML_QuickForm_static
 
  58      * @param     string    $elementLabel   (optional)Link label
 
  59      * @param     string    $href           (optional)Link href
 
  60      * @param     string    $text           (optional)Link display text
 
  61      * @param     mixed     $attributes     (optional)Either a typical HTML attribute string 
 
  62      *                                      or an associative array
 
  68     function HTML_QuickForm_link($elementName=null, $elementLabel=null, $href=null, $text=null, $attributes=null)
 
  70         HTML_QuickForm_element::HTML_QuickForm_element($elementName, $elementLabel, $attributes);
 
  71         $this->_persistantFreeze = false;
 
  72         $this->_type = 'link';
 
  73         $this->setHref($href);
 
  81      * Sets the input field name
 
  83      * @param     string    $name   Input field name attribute
 
  89     function setName($name)
 
  91         $this->updateAttributes(array('name'=>$name));
 
  98      * Returns the element name
 
 107         return $this->getAttribute('name');
 
 114      * Sets value for textarea element
 
 116      * @param     string    $value  Value for password element
 
 122     function setValue($value)
 
 125     } //end func setValue
 
 131      * Returns the value of the form element
 
 141     } // end func getValue
 
 148      * Sets the links href
 
 150      * @param     string    $href
 
 156     function setHref($href)
 
 158         $this->updateAttributes(array('href'=>$href));
 
 159     } // end func setHref
 
 165      * Returns the textarea element in HTML
 
 174         $tabs = $this->_getTabs();
 
 175         $html = "$tabs<a".$this->_getAttrString($this->_attributes).">";
 
 176         $html .= $this->_text;
 
 182     // {{{ getFrozenHtml()
 
 185      * Returns the value of field without HTML tags (in this case, value is changed to a mask)
 
 192     function getFrozenHtml()
 
 195     } //end func getFrozenHtml
 
 199 } //end class HTML_QuickForm_textarea