//
// +X2C includes
-require_once 'BIFE/Generic.php';
+require_once 'BIFE/Container.php';
// ~X2C
// +X2C Class 110 :Link
*
* @access public
*/
-class BIFE_Link extends BIFE_Generic {
+class BIFE_Link extends BIFE_Container {
// ~X2C
// +X2C Operation 111
*/
function __construct($attrs) // ~X2C
{
- $link_attrs['URL'] = @$attrs['URL'];
- unset($attrs['URL']);
- $link_attrs['DESC'] = @$attrs['DESC'];
- unset($attrs['DESC']);
- if (isset($attrs['BIFE'])) {
- $link_attrs['BIFE'] = $attrs['BIFE'];
- $attrs['DATA-BIFE'] = $attrs['BIFE'];
- unset($attrs['BIFE']);
- }
- $query = array();
- foreach($attrs as $name => $value) {
- if (substr($name, 0, 5) === 'DATA-') {
- if ($name = substr($name, 5)) {
- $query[] = urlencode($name) . '=' . urlencode($value);
- }
- }
- }
- if ($query) {
- $link_attrs['URL'] .= '?' . join('&', $query);
- }
+ $link_attrs['URL'] = $this->getURL($attrs);
+ $link_attrs['DESC'] = @$attrs['DESC'];
+ $link_attrs['TARGET'] = @$attrs['TARGET'];
parent::__construct($link_attrs);
}
// -X2C
}
// -X2C
+ // +X2C Operation 157
+ /**
+ * Renders the widget.
+ *
+ * @param HTML_Template_HIT &$template Template to use to render the widget.
+ *
+ * @return string
+ * @access public
+ */
+ function render(&$template) // ~X2C
+ {
+ $this->attrs['CONTENTS'] = $this->renderContents($template);
+ return $template->parse('bife_link', $this->attrs, '', '');
+ }
+ // -X2C
+
} // -X2C Class :Link
?>
\ No newline at end of file