Example #1
0
 /** Handle replacements of hyperlinks for clickthrough tracking (if appropriate) */
 protected function replaceHyperLinks(&$html)
 {
     /* Handle hyperlink clicktrough logging */
     if ($this->getLoggingStatus() == true) {
         $html = HyperLinkUtils::replaceHyperLinks($html, $this->log_as_content);
     }
     return $html;
 }
Example #2
0
 /**
  * Retreives the user interface of this object.
  *
  * Anything that overrides this method should call the parent method with
  * it's output at the END of processing.
  * @return string The HTML fragment for this interface
  */
 public function getUserUI()
 {
     // Init values
     $html = '';
     $url = $this->getString();
     if (HyperLinkUtils::validateURL($url)) {
         $html = "<a href='{$url}'>{$url}</a>\n";
     } else {
         $html = $url . " " . _("(invalid URL)") . "\n";
     }
     /* Handle hyperlink clicktrough logging */
     $html = $this->replaceHyperLinks($html);
     $this->setUserUIMainDisplayContent($html);
     return Content::getUserUI();
 }