PagesNames::names method
If name exceeds maxLength, truncate it, while keeping any numbered suffixes in place
Usage
// basic usage
$string = $pages->names->adjustNameLength(string $name);
// usage with all arguments
$string = $pages->names->adjustNameLength(string $name, int $maxLength = 0);Arguments
| Name | Type(s) | Description |
|---|---|---|
$name | string | |
$maxLength (optional) | int |
Return value
string
$pages->names methods and properties
API reference based on ProcessWire core version 3.0.252