|
1 | 1 | <?php |
2 | 2 | namespace Ajax\semantic\html\base; |
3 | 3 |
|
4 | | -use Ajax\JsUtils; |
5 | 4 | use Ajax\service\JArray; |
| 5 | +use Ajax\common\html\traits\NavElementTrait; |
6 | 6 | /** |
7 | 7 | * Sem class for navigation elements : Breadcrumbs and Pagination |
8 | 8 | * @author jc |
9 | 9 | * @version 1.001 |
10 | 10 | */ |
11 | 11 | abstract class HtmlSemNavElement extends HtmlSemCollection { |
| 12 | + use NavElementTrait; |
12 | 13 | /** |
13 | 14 | * @var string the root site |
14 | 15 | */ |
@@ -44,47 +45,6 @@ public function contentAsString(){ |
44 | 45 | return JArray::implode($this->_contentSeparator, $this->content); |
45 | 46 | } |
46 | 47 |
|
47 | | - /** |
48 | | - * Generate the jquery script to set the elements to the HtmlNavElement |
49 | | - * @param JsUtils $jsUtils |
50 | | - */ |
51 | | - public function jsSetContent(JsUtils $jsUtils){ |
52 | | - $jsUtils->html("#".$this->identifier,str_replace("\"","'", $this->contentAsString()),true); |
53 | | - } |
54 | | - |
55 | | - public function getRoot() { |
56 | | - return $this->root; |
57 | | - } |
58 | | - public function setRoot($root) { |
59 | | - $this->root = $root; |
60 | | - return $this; |
61 | | - } |
62 | | - public function getAttr() { |
63 | | - return $this->attr; |
64 | | - } |
65 | | - |
66 | | - /** |
67 | | - * Define the html attribute for each element url in ajax |
68 | | - * @param string $attr html attribute |
69 | | - * @return HtmlNavElement |
70 | | - */ |
71 | | - public function setAttr($attr) { |
72 | | - $this->attr = $attr; |
73 | | - return $this; |
74 | | - } |
75 | | - |
76 | | - public function __call($method, $args) { |
77 | | - if(isset($this->$method) && is_callable($this->$method)) { |
78 | | - return call_user_func_array( |
79 | | - $this->$method, |
80 | | - $args |
81 | | - ); |
82 | | - } |
83 | | - } |
84 | | - |
85 | | - abstract public function fromDispatcher(JsUtils $js,$dispatcher, $startIndex=0); |
86 | | - |
87 | | - |
88 | 48 | public function setContentDivider($divider,$index=NULL) { |
89 | 49 | $divider="<div class='divider'> {$divider} </div>"; |
90 | 50 | return $this->setDivider($divider, $index); |
|
0 commit comments