PagefilesManager::getFile()

Get the Pagefile object containing the given filename.

Usage

$pagefile = $pagefilesManager->getFile(string $name);

Arguments

NameType(s)Description
$namestring

Name of file to get:

  • If given a URL or path, this will traverse to other pages.
  • If given a basename, it will stay with current page.

Return value

Pagefile Pageimage null

Returns Pagefile or Pageimage object if found, or null if not.


PagefilesManager methods and properties

API reference based on ProcessWire core version 3.0.253