FML/Script/Features/Paging.php
public function addButtonControl(Control $buttonControl, $browseAction = null)
    {
        if ($browseAction === null) {
            $buttonCount = count($this->buttons);
            if ($buttonCount % 2 === 0) {
                $browseAction = $buttonCount / 2 + 1;
            } else {
                $browseAction = $buttonCount / -2 - 1;
            }
        }
        $button = new PagingButton($buttonControl, $browseAction);
        return $this->addButton($button);
    }
public function addButtonControl(Control $buttonControl, $browseAction = null)
    {
        if ($browseAction === null) {
            $buttonCount = count($this->buttons);
            if ($buttonCount % 2 === 0) {
                $browseAction = $buttonCount / 2 + 1;
            } else {
                $browseAction = $buttonCount / -2 - 1;
            }
        }
        $button = new PagingButton($buttonControl, $browseAction);
        return $this->addButton($button);
    }
public function addButtonControl ( Control $ buttonControl , $ browseAction = null ) { if ( $ browseAction === null ) { $ buttonCount = count ( $ this -> buttons ) ; if ( $ buttonCount % 2 === 0 ) { $ browseAction = $ buttonCount / 2 + 1 ; } else { $ browseAction = $ buttonCount / - 2 - 1 ; } } $ button = new PagingButton ( $ buttonControl , $ browseAction ) ; return $ this -> addButton ( $ button ) ; }
Add a new Button Control to browse through the Pages

@api
@param Control $buttonControl Button used for browsing
@param int     $browseAction  (optional) Number of browsed Pages per click
@return static
Add a new Button Control to browse through the Pages