PagefileExtra class

Located in file /wire/core/PagefileExtra.php

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the PagefileExtra class also inherits all the methods and properties of: WireData and Wire.

Show class?             Show args?        


PagefileExtra::HTTPURL string No-cache version of httpUrl 
PagefileExtra::URL string No-cache version of url 
stringReturn just the basename (no path)
Can also be used as property: PagefileExtra::basename
boolCreate the extra file
boolDoes the extra file currently exist?
Can also be used as property: PagefileExtra::exists
PagefileExtra::ext string Alias of extension 
PagefileExtra::extension string File extension 
stringReturn the full server disk path to the extra file, whether it exists or not
Can also be used as property: PagefileExtra::filename
intReturn the file size in bytes
Can also be used as property: PagefileExtra::filesize
stringReturn human readable file size string
Can also be used as property: PagefileExtra::filesizeStr
PagefileExtra::get(string $key)
bool int mixed null stringGet property 
stringReturn the HTTP URL to the extra file
Can also be used as property: PagefileExtra::httpUrl
stringGet cache busted URL
PagefileExtra::pagefile Pagefile Pageimage Source Pageimage object 
PagefileExtra::pathname string Alias of filename 
boolRename the extra file to be consistent with Pagefile name 
PagefileExtra::savings int Bytes saved by this extra 
PagefileExtra::savingsPct string Percent savings by this extra 
PagefileExtra::savingsStr string Human readable savings by this extra 
(nothing)Set extension for this extra 
PagefileExtra::setPagefile(Pagefile $pagefile)
(nothing)Set Pagefile instance this extra is connected to 
boolUnlink/delete the extra file 
stringReturn the URL to the extra file, creating it if it does not already exist
Can also be used as property: PagefileExtra::url
PagefileExtra::useSrcExt bool Use longer filenames that also include the Pagefile’s extension? (default=false) 
PagefileExtra::useSrcUrlOnFail bool Use source Pagefile URL if extra image does not exist and cannot be created? (default=false) 
PagefileExtra::useSrcUrlOnSize bool Use source Pagefile URL if extra file is larger than source file? (default=false) 

Additional methods and properties

In addition to the methods and properties above, PagefileExtra also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.200

Twitter updates

  • Introduction to an invoice application profile being built in ProcessWire: More
    30 September 2022
  • Stumbling upon a really nice ProcessWire-powered website, plus core updates including API improvements for ProcessWire forms— More
    9 September 2022
  • Useful new dot-and-bracket syntax options added for page.get() method— More
    2 September 2022

Latest news

  • ProcessWire Weekly #438
    In the 348th issue of ProcessWire Weekly we're going to cover the latest weekly update from Ryan, take a closer look at a couple of new third party modules, and more. Read on! / 1 October 2022
  • Multi-language field translation export/import
    In this post we cover the details of a new module that enables export and import capabilities for multi-language fields in ProcessWire.
    Blog / 5 August 2022
  • Subscribe to weekly ProcessWire news

“The end client and designer love the ease at which they can update the website. Training beyond how to log in wasn’t even necessary since ProcessWire’s default interface is straightforward.” —Jonathan Lahijani