1 | <?php |
||
16 | class HtmlBreadcrumbs extends HtmlNavElement { |
||
17 | |||
18 | /** |
||
19 | * @var integer the start index for href generation |
||
20 | */ |
||
21 | protected $startIndex=0; |
||
22 | /** |
||
23 | * @var boolean $autoActive sets the last element's class to <b>active</b> if true |
||
24 | */ |
||
25 | protected $autoActive; |
||
26 | |||
27 | /** |
||
28 | * @var boolean if set to true, the path of the elements is absolute |
||
29 | */ |
||
30 | protected $absolutePaths; |
||
31 | |||
32 | /** |
||
33 | * @var function the function who generates the href elements. default : function($e){return $e->getContent()} |
||
34 | */ |
||
35 | protected $_hrefFunction; |
||
36 | |||
37 | |||
38 | /** |
||
39 | * @param string $identifier |
||
40 | * @param array $elements |
||
41 | * @param boolean $autoActive sets the last element's class to <b>active</b> if true |
||
42 | * @param function $hrefFunction the function who generates the href elements. default : function($e){return $e->getContent()} |
||
43 | */ |
||
44 | public function __construct($identifier,$elements=array(),$autoActive=true,$startIndex=0,$hrefFunction=NULL){ |
||
57 | |||
58 | /** |
||
59 | * @param mixed $element |
||
60 | * @param string $href |
||
61 | * @return \Ajax\bootstrap\html\HtmlLink |
||
62 | */ |
||
63 | public function addElement($element,$href="",$glyph=NULL){ |
||
81 | |||
82 | public function setActive($index=null){ |
||
91 | |||
92 | public function addElements($elements){ |
||
98 | |||
99 | public function fromArray($array){ |
||
104 | |||
105 | /** |
||
106 | * Return the url of the element at $index or the breadcrumbs url if $index is ommited |
||
107 | * @param int $index |
||
108 | * @param string $separator |
||
109 | * @return string |
||
110 | */ |
||
111 | public function getHref($index=null,$separator="/"){ |
||
121 | |||
122 | /* |
||
123 | * (non-PHPdoc) |
||
124 | * @see \Ajax\bootstrap\html\BaseHtml::compile() |
||
125 | */ |
||
126 | public function compile(JsUtils $js=NULL, View $view=NULL) { |
||
132 | |||
133 | /* (non-PHPdoc) |
||
134 | * @see \Ajax\bootstrap\html\base\BaseHtml::fromDatabaseObject() |
||
135 | */ |
||
136 | public function fromDatabaseObject($object, $function) { |
||
139 | |||
140 | /* |
||
141 | * (non-PHPdoc) |
||
142 | * @see \Ajax\bootstrap\html\base\BaseHtml::on() |
||
143 | */ |
||
144 | public function on($event, $jsCode, $stopPropagation=false, $preventDefault=false) { |
||
150 | |||
151 | public function setAutoActive($autoActive) { |
||
155 | |||
156 | public function _ajaxOn($operation, $event, $url, $responseElement="", $parameters=array()) { |
||
162 | |||
163 | /** |
||
164 | * Associate an ajax get to the breadcrumbs elements, displayed in $targetSelector |
||
165 | * $attr member is used to build each element url |
||
166 | * @param string $targetSelector the target of the get |
||
167 | * @param string $attr the html attribute used to build the elements url |
||
168 | * @return HtmlBreadcrumbs |
||
169 | */ |
||
170 | public function autoGetOnClick($targetSelector){ |
||
173 | |||
174 | public function contentAsString(){ |
||
180 | |||
181 | public function getElement($index){ |
||
184 | |||
185 | /** |
||
186 | * Add a glyphicon to the element at index $index |
||
187 | * @param mixed $glyph |
||
188 | * @param int $index |
||
189 | */ |
||
190 | public function addGlyph($glyph,$index=0){ |
||
194 | |||
195 | /** |
||
196 | * Add new elements in breadcrumbs corresponding to request dispatcher : controllerName, actionName, parameters |
||
197 | * @param Dispatcher $dispatcher the request dispatcher |
||
198 | * @return \Ajax\bootstrap\html\HtmlBreadcrumbs |
||
199 | */ |
||
200 | public function fromDispatcher($dispatcher){ |
||
210 | |||
211 | |||
212 | /** |
||
213 | * sets the function who generates the href elements. default : function($element){return $element->getContent()} |
||
214 | * @param function $_hrefFunction |
||
215 | * @return \Ajax\bootstrap\html\HtmlBreadcrumbs |
||
216 | */ |
||
217 | public function setHrefFunction($_hrefFunction) { |
||
221 | |||
222 | public function setStartIndex($startIndex) { |
||
226 | |||
227 | |||
228 | } |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..