PagerModule::configure PHP Метод

configure() публичный Метод

Define all required parameters to create the Pager and PagerDetails.
public configure ( $Offset, $Limit, $TotalRecords, $Url, boolean $ForceConfigure = false )
$Offset
$Limit
$TotalRecords
$Url
$ForceConfigure boolean
    public function configure($Offset, $Limit, $TotalRecords, $Url, $ForceConfigure = false)
    {
        if ($this->_PropertiesDefined === false || $ForceConfigure === true) {
            if (is_array($Url)) {
                if (count($Url) == 1) {
                    $this->UrlCallBack = array_pop($Url);
                } else {
                    $this->UrlCallBack = $Url;
                }
            } else {
                $this->Url = $Url;
            }
            $this->Offset = $Offset;
            $this->Limit = is_numeric($Limit) && $Limit > 0 ? $Limit : $this->Limit;
            $this->TotalRecords = $TotalRecords;
            $this->_LastOffset = $this->Offset + $this->Limit;
            $this->_Totalled = $this->TotalRecords >= $this->Limit ? false : true;
            if ($this->_LastOffset > $this->TotalRecords) {
                $this->_LastOffset = $this->TotalRecords;
            }
            $this->_PropertiesDefined = true;
            Gdn::controller()->EventArguments['Pager'] = $this;
            Gdn::controller()->fireEvent('PagerInit');
        }
    }