FieldtypeRepeaterMatrix::getMatrixTypesInfo()
Get all information available for each matrix type in an array of arrays indexed by type name
Note: it is preferable to use use RepeaterMatrixField::getMaxMatrixTypes() instead.
Unless only a specific property is requested (via the get option), returned array includes the following:
type(int): Type numbername(string): Matrix type nameprefix(string): Prefix used in identifying this type’s settings in the Field objectlabel(string): Matrix type labellabel123…(string): Matrix type label per-language (if multi-language) where “123…” is language ID, for all languages.sort(int): Sort valuefile(string): Optional PHP render file (whether it exists or not)head(string): Optional definition for item headersfield(Field): Field that these matrix types are forfields(array): Array of Field objects used by this matrix type (in template context), indexed by Field namefieldIDs(array): Array of Field IDs used by this matrix type
If a specific property is requested (via the get option) then returned array is of strings or ints, depending on what
was requested. If the type option is used then the returned array wil be only info for that type, or if combined with the get option then return value is just the property for that type (int or string).
A blank array or null is returned if you asked for something that isn’t there.
Usage
// basic usage
$array = $fieldtypeRepeaterMatrix->getMatrixTypesInfo();
// usage with all arguments
$array = $fieldtypeRepeaterMatrix->getMatrixTypesInfo($field = null, array $options = []);Arguments
| Name | Type(s) | Description |
|---|---|---|
$field (optional) | Field null | |
$options (optional) | array |
|
Return value
array string null
FieldtypeRepeaterMatrix methods and properties
API reference based on ProcessWire core version 3.0.259