FieldtypeRepeater class

Maintains a collection of fields that are repeated for any number of times.

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the FieldtypeRepeater class also inherits all the methods and properties of: Fieldtype, WireData and Wire.

Show class?             Show args?        

Common

NameReturnSummary 
FieldtypeRepeater::cloneField(Field $field)
FieldCreate a cloned copy of Field
FieldtypeRepeater::countOldReadyPages(Field $field)
intCount or delete old ready pages that are just taking up space 
FieldtypeRepeater::deleteField(Field $field)
boolDelete the given field, which implies: drop the table $field->table
FieldtypeRepeater::deletePageField(Page $page, Field $field)
boolDelete the given Field from the given Page
FieldtypeRepeater::deleteRepeaterPage(Page $page)
intDelete a repeater page, removing system statuses first 
FieldtypeRepeater::exportValue(Page $page, Field $field, RepeaterPageArray $value)
arrayExport repeater value
FieldtypeRepeater::findUnnecessaryParents(Field $field)
PageArrayFind unnecessary parent pages that may be deleted 
FieldtypeRepeater::formatValue(Page $page, Field $field, PageArray $value)
PageArrayPerform output formatting on the value delivered to the API
FieldtypeRepeater::getBlankRepeaterPage(Page $page, Field $field)
PageReturns a blank page ready for use as a repeater 
FieldtypeRepeater::getBlankValue(Page $page, Field $field)
PageArray RepeaterPageArrayGet a blank value of this type, i.e. return a blank PageArray 
FieldtypeRepeater::getCompatibleFieldtypes(Field $field)
WireArrayFieldtypeRepeater instances are only compatible with other FieldtypeRepeater derived classes.
FieldtypeRepeater::getConfigAdvancedInputfields(Field $field)
InputfieldWrapperRemove advanced options that aren't supposed with repeaters
FieldtypeRepeater::getConfigInputfields(Field $field)
InputfieldWrapperReturn configuration fields definable for each FieldtypePage
FieldtypeRepeater::getCustomPageClass(Field $field)
stringGet custom RepeaterPage class for given repeater field 
FieldtypeRepeater::getDatabaseSchema(Field $field)
arrayReturn the database schema in predefined format 
FieldtypeRepeater::getFieldClass()
stringGet class name to use Field objects of this type (must be class that extends Field class) 
FieldtypeRepeater::getInputfield(Page $page, Field $field)
InputfieldReturn an InputfieldRepeater, ready to be used 
FieldtypeRepeater::getMatchQuery(PageFinderDatabaseQuerySelect $query, string $table, string $subfield, string $operator, string $value)
PageFinderDatabaseQuerySelectUpdate a DatabaseQuerySelect object to match a Page 
FieldtypeRepeater::getNextReadyPage(Page $page, Field $field)
PageGet next page ready to be used as a new repeater item, creating it if it doesn't already exist 
FieldtypeRepeater::getPageArrayClass()
stringGet the class used for repeater PageArray objects 
FieldtypeRepeater::getPageClass()
stringGet the class used for repeater Page objects 
FieldtypeRepeater::getRepeaterConfigHelper(Field $field)
FieldtypeRepeaterConfigHelper@param Field $field 
FieldtypeRepeater::getRepeaterPageParent(Page $page, Field $field)
Page NullPageReturn the parent used by the repeater pages for the given Page and Field 
FieldtypeRepeater::getRepeaterParent(Field $field)
PageReturn the repeater parent used by $field, i.e. /processwire/repeaters/for-field-123/ 
FieldtypeRepeater::getRepeatersRootPage()
PageGet repeaters root page 
FieldtypeRepeater::getSelectorInfo(Field $field)
arrayGet information used by selectors for querying this field
FieldtypeRepeater::getUniqueRepeaterPageName()
stringReturns a unique name for a repeater page 
FieldtypeRepeater::importValue(Page $page, Field $field, array $value)
bool PageArrayImport repeater value previously exported by exportValue()
FieldtypeRepeater::initAllFields()
(nothing)Force initialize of all repeater fields, confirming their configuration settings are correct 
FieldtypeRepeater::porter()
FieldtypeRepeaterPorter@return FieldtypeRepeaterPorter 
FieldtypeRepeater::repeatersRootPageID int 
FieldtypeRepeater::sanitizeValue(Page $page, Field $field, mixed $value)
PageArray RepeaterPageArrayHandles the sanitization and convertion to PageArray value 
FieldtypeRepeater::sanitizeValueString(Page $page, Field $field, string $value)
Page PageArrayGiven a string value return a Page or PageArray 
FieldtypeRepeater::savePageField(Page $page, Field $field)
boolSave the given field from page
FieldtypeRepeater::setCustomPageClass(Field $field, string $class)
(nothing)Set custom RepeaterPage class for given field 
FieldtypeRepeater::sleepValue(Page $page, Field $field, $value)
arrayGiven an 'awake' value, as set by wakeupValue, convert the value back to a basic type for storage in DB.
FieldtypeRepeater::useLazyParents($field)
boolUse lazy parents mode? 
FieldtypeRepeater::wakeupValue(Page $page, Field $field, array $value)
PageArrayGiven a raw value (value as stored in DB), return the value as it would appear in a Page object

Additional methods and properties

In addition to the methods and properties above, FieldtypeRepeater also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.236

Latest news

  • ProcessWire Weekly #542
    In the 542nd issue of ProcessWire Weekly we'll check out a couple of new third party modules, a new site of the week, and more. Read on!
    Weekly.pw / 28 September 2024
  • Custom Fields Module
    This week we look at a new ProFields module named Custom Fields. This module provides a way to rapidly build out ProcessWire fields that contain any number of subfields/properties within them.
    Blog / 30 August 2024
  • Subscribe to weekly ProcessWire news

“Yesterday I sent the client a short documentation for their ProcessWire-powered website. Today all features already used with no questions. #cmsdoneright—Marc Hinse, Web designer/developer