You are here

function Pagination::paginate in Pagination (Node) 6

Same name and namespace in other branches
  1. 7 includes/Pagination.inc \Pagination::paginate()

@desc Paginate text

Parameters

string text to paginate: @param int size of text to make breaks at @return void @public

File

./pagination.module, line 533
pagination.module @desc Allow for arbitrary nodes to be paginated. administrators can set which nodes they wish to paginate, and the length of content required to split a node into pages. Alternatively, content creators can set manual break points…

Class

Pagination
@desc Handles all the pagination logic

Code

function paginate($text, $cutoff) {
  $textsize = strlen($text);
  do {
    $section = $this
      ->parseText($text, $cutoff);
    $this->page[] = $section;
    $textsize = strlen($text);
  } while ($textsize > 0);
}