FieldtypeRepeater::countOldReadyPages() method

Count or delete old ready pages that are just taking up space

Usage

// basic usage
$int = $fieldtypeRepeater->countOldReadyPages(Field $field);

// usage with all arguments
$int = $fieldtypeRepeater->countOldReadyPages(Field $field, bool $delete = false, int $secondsOld = 259200);

Arguments

NameType(s)Description
fieldField
delete (optional)bool

Specify true to delete the old ready pages

secondsOld (optional)int

Number of seconds old that the page has to be to be considered "old" (default=259200 or 3 days)

Return value

int

Count of old ready pages, or if $delete===true, then number that was deleted


FieldtypeRepeater methods and properties

API reference based on ProcessWire core version 3.0.244

“I am currently managing a ProcessWire site with 2 million+ pages. It’s admirably fast, and much, much faster than any other CMS we tested.” —Nickie, Web developer