54 $this->urlMask=
"%page%";
66 $elem->setProperty(
"class",
"disabled");
69 $content.=
"<span class='sr-only'>(current)</span>";
70 $elem->setProperty(
"class",
"active");
75 $href->setProperty($this->attr, $url);
76 $elem->setContent($href);
80 $this->content[]=$elem;
85 $this->content=array();
86 $this->
createElement($this->active-1,
"<span aria-hidden='true'>«</span>",$this->active===1);
88 $end=min($start+$this->countVisible-1,$this->to);
89 for($index=$start;$index<=$end;$index++){
90 $this->
createElement($index,$index,
false,$index===$this->active);
92 $this->
createElement($this->active+1,
"<span aria-hidden='true'>»</span>",$this->active===$this->to);
96 return (
int)($this->countVisible/2);
101 if($this->countVisible!==$this->to-$this->from+1){
102 $result=max($this->active-$this->
half(),$result);
108 foreach ($this->content as $li){
111 $content->_addEvent($event,$jsCode);
122 $url=implode(
"/", $items);
123 if($this->urlMask===
"%page%"){
124 $this->urlMask=preg_replace(
"/[0-9]/",
"%page%", $url);
126 for($index=$this->from;$index<=
$this->to;$index++){
127 if($this->
getUrl($index)==$url){
136 return str_ireplace(
"%page%", $index, $this->urlMask);
147 return $this->
addToPropertyUnique(
"class", CssRef::sizes(
"pagination")[$size], CssRef::sizes(
"pagination"));
149 if(!JString::startsWith($size,
"pagination-") && $size!==
"")
150 $size=
"pagination-".$size;
fromDispatcher($dispatcher)
Collects url parts from the request dispatcher : controllerName, actionName, parameters Used internal...
Default HTML values for Twitter Bootstrap HTML components.
Bs class for navigation elements : Breadcrumbs and Pagination.
BaseHtml for HTML components.
addToPropertyUnique($name, $value, $typeCtrl)
addToPropertyCtrl($name, $value, $typeCtrl)
setProperty($name, $value)