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