@@ 44-56 (lines=13) @@ | ||
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){ |
|
45 | parent::__construct($identifier,"ol"); |
|
46 | $this->startIndex=$startIndex; |
|
47 | $this->setProperty("class", "breadcrumb"); |
|
48 | $this->content=array(); |
|
49 | $this->autoActive=$autoActive; |
|
50 | $this->absolutePaths; |
|
51 | $this->_hrefFunction=function ($e){return $e->getContent();}; |
|
52 | if(isset($hrefFunction)){ |
|
53 | $this->_hrefFunction=$hrefFunction; |
|
54 | } |
|
55 | $this->addElements($elements); |
|
56 | } |
|
57 | ||
58 | /** |
|
59 | * @param mixed $element |
@@ 49-61 (lines=13) @@ | ||
46 | * @param boolean $autoActive sets the last element's class to <b>active</b> if true |
|
47 | * @param function $hrefFunction the function who generates the href elements. default : function($e){return $e->getContent()} |
|
48 | */ |
|
49 | public function __construct($identifier, $items=array(), $autoActive=true, $startIndex=0, $hrefFunction=NULL) { |
|
50 | parent::__construct($identifier, "div", "ui breadcrumb"); |
|
51 | $this->startIndex=$startIndex; |
|
52 | $this->autoActive=$autoActive; |
|
53 | $this->_contentSeparator="<div class='divider'> / </div>"; |
|
54 | $this->_hrefFunction=function ($e) { |
|
55 | return $e->getContent(); |
|
56 | }; |
|
57 | if (isset($hrefFunction)) { |
|
58 | $this->_hrefFunction=$hrefFunction; |
|
59 | } |
|
60 | $this->addItems($items); |
|
61 | } |
|
62 | ||
63 | /** |
|
64 | * Associate an ajax get to the breadcrumb elements, displayed in $targetSelector |