X-Git-Url: https://git.llucax.com/software/bife/bife-all.git/blobdiff_plain/ae45b7ad8f896784fe169d02c726098284f14f25..0a301ab1c8ef1a70da6f7425f040216a607aaeb1:/modules/basic/BIFE/Link.php?ds=sidebyside diff --git a/modules/basic/BIFE/Link.php b/modules/basic/BIFE/Link.php index 02a3c80..c8900d6 100644 --- a/modules/basic/BIFE/Link.php +++ b/modules/basic/BIFE/Link.php @@ -27,7 +27,7 @@ // // +X2C includes -require_once 'BIFE/Generic.php'; +require_once 'BIFE/Container.php'; // ~X2C // +X2C Class 110 :Link @@ -36,7 +36,7 @@ require_once 'BIFE/Generic.php'; * * @access public */ -class BIFE_Link extends BIFE_Generic { +class BIFE_Link extends BIFE_Container { // ~X2C // +X2C Operation 111 @@ -65,26 +65,9 @@ class BIFE_Link extends BIFE_Generic { */ 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 @@ -121,6 +104,22 @@ class BIFE_Link extends BIFE_Generic { } // -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