Get a basename for the file, possibly shortened, suitable for display in InputfieldFileList
Usage
// basic usage
$string = $inputfieldFile->getDisplayBasename(Pagefile $pagefile);
// usage with all arguments
$string = $inputfieldFile->getDisplayBasename(Pagefile $pagefile, int $maxLength = 25);
Arguments
Name | Type(s) | Description |
---|---|---|
pagefile | Pagefile | |
maxLength (optional) | int |
Return value
string
InputfieldFile methods and properties
API reference based on ProcessWire core version 3.0.236