phpMv -UI toolkit 2.4.12
jQuery, jQuery UI, Twitter Bootstrap and Semantic-UI library for php & php MVC Frameworks
Loading...
Searching...
No Matches
HtmlLink.php
Go to the documentation of this file.
1<?php
2
4
9
11
12 public function __construct($identifier, $href="#", $content="Link",$target=NULL) {
13 parent::__construct($identifier, "a", "");
14 $this->setHref($href);
15 if(isset($target))
16 $this->setTarget($target);
17 $this->content=$content;
18 }
19
20 /*
21 * (non-PHPdoc)
22 * @see \Ajax\bootstrap\html\base\HtmlSingleElement::run()
23 */
24 public function run(JsUtils $js) {
25 $this->_bsComponent=$js->semantic()->generic("#" . $this->identifier);
26 $this->addEventsOnRun($js);
28 }
29
30 public function addIcon($icon, $before=true) {
31 return $this->addContent(new HtmlIcon("icon-" . $this->identifier, $icon), $before);
32 }
33
34 public static function icon($identifier, $icon, $href="#", $label=NULL) {
35 $result=new HtmlLink($identifier, $href, $label);
36 return $result->addIcon($icon);
37 }
38}
JQuery PHP library.
Definition JsUtils.php:23
semantic(Semantic $semantic=NULL)
getter or setter of the Semantic-UI variable
Definition JsUtils.php:158
addContent($content, $before=false)
Base class for Semantic double elements.
Semantic Icon component.
Definition HtmlIcon.php:14