InputfieldFile::getDisplayBasename()

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

NameType(s)Description
$pagefilePagefile
$maxLength (optional)int

Return value

string


InputfieldFile methods and properties

API reference based on ProcessWire core version 3.0.252