PagerModule::details PHP Метод

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

Builds a string with information about the page list's current position (ie. "1 to 15 of 56").
public details ( string $FormatString = '' ) : boolean | string
$FormatString string
Результат boolean | string Built string.
    public function details($FormatString = '')
    {
        if ($this->_PropertiesDefined === false) {
            trigger_error(ErrorMessage('You must configure the pager with $Pager->configure() before retrieving the pager details.', 'MorePager', 'Details'), E_USER_ERROR);
        }
        $Details = false;
        if ($this->TotalRecords > 0) {
            if ($FormatString != '') {
                $Details = sprintf(t($FormatString), $this->Offset + 1, $this->_LastOffset, $this->TotalRecords);
            } elseif ($this->_Totalled === true) {
                $Details = sprintf(t('%1$s to %2$s of %3$s'), $this->Offset + 1, $this->_LastOffset, $this->TotalRecords);
            } else {
                $Details = sprintf(t('%1$s to %2$s'), $this->Offset, $this->_LastOffset);
            }
        }
        return $Details;
    }