Esempio n. 1
0
 /**
  * A widget for displaying an image (img)
  * @param string $imgurl The url of the image
  * @param string $alttext A text that will be shown if the image could not be loaded
  * @param boolean $forcehttps Specify if the link has to have https 
  * @param HtmlAttributes $args Allows custom html tag arguments to be specified (not recommended)
  **/
 public function __construct($imgurl = EMPTYSTRING, $alttext = '[IMG]', $args = null)
 {
     parent::__construct();
     $img = new HtmlElement('img', $args);
     $img->AddAttributes(array('src' => RTK::GetBaseURL() . $imgurl, 'alt' => $alttext));
     $this->AddChild($img);
 }
Esempio n. 2
0
 /**
  * A widget containing a clickable link (a)
  * @param string $url The url of the link
  * @param string $name The title of the list
  * @param boolean $forcehttps Specify if the link has to have https
  * @param HtmlAttributes $args Allows custom html tag arguments to be specified (not recommended)
  **/
 public function __construct($url = null, $name = null, $forcehttps = false, $args = null)
 {
     if ($url == null) {
         $url = RTK_EMPTYSTRING;
     }
     if ($name == null) {
         $name = RTK_EMPTYSTRING;
     }
     parent::__construct('a', array('href' => RTK::GetBaseURL($forcehttps) . $url), $name);
     $this->AddAttributes($args);
 }