$Id$
-----------------------------------------------------------------------------*/
-// +X2C includes
require_once 'HTML/Common.php';
-// ~X2C
-// +X2C Class 892 :MECON_HTML_Link
/**
* HTML Link representation.
When adding GET variables, if the value is an object, it looks for a toString() method, if it doesn't exists or if is an array, it serializes the object/array to get a string value.
{
return $this->_getVars;
}
+
/**
* Sets GetVars.
*
$this->_getVars = $getVars;
}
- // ~X2C
-
- // +X2C Operation 178
/**
* Constructor.
*
* @return void
* @access public
*/
- function MECON_HTML_Link($href = '', $contents = '', $getVars = array(), $attrs = array()) // ~X2C
+ function MECON_HTML_Link($href = '', $contents = '', $getVars = array(), $attrs = array())
{
if (is_array($attrs)) {
$attrs['href'] = $href;
+ if (!isset($attrs['class'])){
+ $attrs['class'] = 'mecon_html_link';
+ }
} else {
$attrs .= " href=$href";
}
$this->_getVars = $getVars;
$this->addContents($contents);
}
- // -X2C
- // +X2C Operation 179
/**
* Converts to HTML output.
*
}
return "<A$attrs>" . $this->getContents() . '</A>';
}
- // -X2C
- // +X2C Operation 180
/**
* Gets hypertext reference.
*
{
return $this->getAttribute('href');
}
- // -X2C
- // +X2C Operation 181
/**
* Sets hypertext reference.
*
{
$this->updateAttributes(array('href' => $href));
}
- // -X2C
- // +X2C Operation 182
/**
* Set a GET variable.
*
{
$this->_getVars[$key] = $value;
}
- // -X2C
- // +X2C Operation 183
/**
* Updates GET variables.
*
{
$this->_getVars += $vars;
}
- // -X2C
- // +X2C Operation 184
/**
* Unsets (removes) GET variables. This method supports variable arguments.
*
unset($this->_getVars[$key]);
}
}
- // -X2C
- // +X2C Operation 185
/**
* Adds contents to the link.
*
{
$this->_contents[] = $contents;
}
- // -X2C
- // +X2C Operation 186
/**
* @return string
* @access public
}
return $html;
}
- // -X2C
- // +X2C Operation 187
/**
* @param mixed $contents New link contents.
*
{
$this->_contents = array($contents);
}
- // -X2C
-} // -X2C Class :MECON_HTML_Link
+ /**
+ * @param mixed $contents New link contents.
+ *
+ * @return void
+ * @access public
+ */
+ function getCSS()
+ {
+ return '/MECON/css/html/link.css';
+ }
+
+}
?>
\ No newline at end of file