@@ 9-28 (lines=20) @@ | ||
6 | use Ajax\bootstrap\html\base\HtmlBsDoubleElement; |
|
7 | use Ajax\common\html\html5\HtmlLinkTrait; |
|
8 | ||
9 | class HtmlLink extends HtmlBsDoubleElement { |
|
10 | use HtmlLinkTrait; |
|
11 | ||
12 | public function __construct($identifier, $href="#", $content="Link") { |
|
13 | parent::__construct($identifier, "a"); |
|
14 | $this->setHref($href); |
|
15 | $this->content=$content; |
|
16 | } |
|
17 | ||
18 | /* |
|
19 | * (non-PHPdoc) |
|
20 | * @see \Ajax\bootstrap\html\base\HtmlSingleElement::run() |
|
21 | */ |
|
22 | public function run(JsUtils $js) { |
|
23 | $this->_bsComponent=$js->bootstrap()->generic("#".$this->identifier); |
|
24 | $this->addEventsOnRun($js); |
|
25 | return $this->_bsComponent; |
|
26 | } |
|
27 | // TODO use Class Tag |
|
28 | } |
@@ 13-27 (lines=15) @@ | ||
10 | * @author jc |
|
11 | * @version 1.001 |
|
12 | */ |
|
13 | abstract class HtmlSemCollection extends HtmlCollection{ |
|
14 | use BaseTrait; |
|
15 | public function __construct( $identifier, $tagName="div",$baseClass=""){ |
|
16 | parent::__construct( $identifier, $tagName); |
|
17 | $this->_baseClass=$baseClass; |
|
18 | $this->setClass($baseClass); |
|
19 | } |
|
20 | ||
21 | public function run(JsUtils $js) { |
|
22 | parent::run($js); |
|
23 | $this->_bsComponent=$js->semantic()->generic("#".$this->identifier); |
|
24 | $this->addEventsOnRun($js); |
|
25 | return $this->_bsComponent; |
|
26 | } |
|
27 | } |