/** * method for creating a html link. It will check with the rewrite module * to see if the url has been rewritten (if the module is installed). Use * createLinkSimple if you just need a link without any side effects. * @param string $url the a href attribute * @param string $title the value of the link * @param array $options e.g. css class or javascript actions, e.g. ('class' => 'error') * @return string $link the html link */ public static function createLink($url, $title, $options = array()) { if (isset($options['anchor_part'])) { $url .= $options['anchor_part']; unset($options['anchor_part']); } if (method_exists('mainTemplate', 'createLink')) { // Override link in template $link = \mainTemplate::createLink($url, $title, $options); } else { // Default link $options = self::parseExtra($options); $link = "<a href=\"{$url}\" {$options} >{$title}</a>"; } return $link; }