Пример #1
0
 function preFilter()
 {
     // Set styles
     $this->arrowFastNext->setStyle($this->arrowNoneStyle);
     $this->arrowFastPrev->setStyle($this->arrowNoneStyle);
     $this->arrowFirst->setStyle($this->arrowNoneStyle);
     $this->arrowLast->setStyle($this->arrowNoneStyle);
     $this->arrowPrev->setStyle($this->arrowNoneStyle);
     $this->arrowNext->setStyle($this->arrowNoneStyle);
     // Arrow styles
     if ($this->arrowNext->hasLink()) {
         $this->arrowNext->setStyle($this->arrowNextStyle);
     }
     if ($this->arrowPrev->hasLink()) {
         $this->arrowPrev->setStyle($this->arrowPrevStyle);
     }
     if ($this->arrowNext->hasLink() && $this->arrowFastNext->hasLink()) {
         $this->arrowFastNext->setStyle($this->arrowFastNextStyle);
     } else {
         $this->arrowFastNext->setManialink(null);
     }
     if ($this->arrowPrev->hasLink() && $this->arrowFastPrev->hasLink()) {
         $this->arrowFastPrev->setStyle($this->arrowFastPrevStyle);
     } else {
         $this->arrowFastPrev->setManialink(null);
     }
     if ($this->arrowNext->hasLink() && $this->arrowLast->hasLink()) {
         $this->arrowLast->setStyle($this->arrowLastStyle);
     } else {
         $this->arrowLast->setManialink(null);
     }
     if ($this->arrowPrev->hasLink() && $this->arrowFirst->hasLink()) {
         $this->arrowFirst->setStyle($this->arrowFirstStyle);
     } else {
         $this->arrowFirst->setManialink(null);
     }
     $this->text->setText($this->currentPage . ' / ' . $this->pageNumber);
     $this->text->setAlign('center', 'center2');
     $this->text->setRelativeAlign('center', 'center');
     $this->text->setPosnZ(0.1);
     $this->textBg->setBothAlign('center', 'center');
     $this->arrowNext->setRelativeAlign('center', 'center')->setValign("center");
     $this->arrowFastNext->setRelativeAlign('center', 'center')->setValign("center");
     $this->arrowLast->setRelativeAlign('center', 'center')->setValign("center");
     $this->arrowNext->setPosn((int) $this->showText * $this->text->getSizenX() / 2, 0, 1);
     $this->arrowFastNext->setPosn($this->arrowNext->getPosnX() + $this->arrowNext->getSizenX(), 0, 1);
     $this->arrowLast->setPosn($this->arrowNext->getPosnX() + (int) $this->showFastNext * $this->arrowFastNext->getSizenX() + $this->arrowNext->getSizenX(), 0, 1);
     $this->arrowPrev->setRelativeAlign('center', 'center')->setAlign("right", "center");
     $this->arrowFastPrev->setRelativeAlign('center', 'center')->setAlign("right", "center");
     $this->arrowFirst->setRelativeAlign('center', 'center')->setAlign("right", "center");
     $this->arrowPrev->setPosn(-((int) $this->showText * $this->text->getSizenX() / 2), 0, 1);
     $this->arrowFastPrev->setPosn($this->arrowPrev->getPosnX() - $this->arrowPrev->getSizenX(), 0, 1);
     $this->arrowFirst->setPosn($this->arrowPrev->getPosnX() - (int) $this->showFastNext * $this->arrowFastPrev->getSizenX() - $this->arrowPrev->getSizenX(), 0, 1);
     if ($this->showText) {
         $this->appendChild($this->text);
         $this->appendChild($this->textBg);
     }
     if ($this->showFastNext) {
         $this->appendChild($this->arrowFastNext);
         $this->appendChild($this->arrowFastPrev);
     }
     if ($this->showLast) {
         $this->appendChild($this->arrowFirst);
         $this->appendChild($this->arrowLast);
     }
     $this->appendChild($this->arrowPrev);
     $this->appendChild($this->arrowNext);
 }