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?        

Common

NameReturnSummary 
PagefileExtra::HTTPURL string No-cache version of httpUrl 
PagefileExtra::URL string No-cache version of url 
PagefileExtra::basename()
stringReturn just the basename (no path)
Can also be used as property: PagefileExtra::basename
 
PagefileExtra::create()
boolCreate the extra file
PagefileExtra::exists()
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 
PagefileExtra::filename()
stringReturn the full server disk path to the extra file, whether it exists or not
Can also be used as property: PagefileExtra::filename
 
PagefileExtra::filesize()
intReturn the file size in bytes
Can also be used as property: PagefileExtra::filesize
 
PagefileExtra::get(string $key)
bool int mixed null stringGet property 
PagefileExtra::httpUrl()
stringReturn the HTTP URL to the extra file
Can also be used as property: PagefileExtra::httpUrl
 
PagefileExtra::pagefile Pagefile Pageimage Source Pageimage object 
PagefileExtra::pathname string Alias of filename 
PagefileExtra::rename()
boolRename the extra file to be consistent with Pagefile name 
PagefileExtra::setExtension($extension)
(nothing)Set extension for this extra 
PagefileExtra::setPagefile(Pagefile $pagefile)
(nothing)Set Pagefile instance this extra is connected to 
PagefileExtra::unlink()
boolUnlink/delete the extra file 
PagefileExtra::url()
stringReturn the URL to the extra file, creating it if it does not already exist
Can also be used as property: PagefileExtra::url
 
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.133

Twitter updates

  • ProcessWire 3.0.133 adds a useful new Page::meta() method for a new type of page-specific persistent data storage, adds the ability for users to create their own bookmarks in Lister, and has a handy and time saving update for the asmSelect input type— More
    14 June 2019
  • New post: This week we’ll take a look at 3 different WEBP image strategies that you can use in ProcessWire 3.0.132+. Then we’ll dive into a major update for the Google Client API module, and finish up by outlining some useful new updates in FormBuilder— More
    31 May 2019
  • New post: This week we've added WEBP support in ProcessWire thanks to a GitHub pull request from Horst Nogajski. This enables you to have highly optimized image output in PW and I think you’ll really like the difference it makes— More
    24 May 2019

Latest news

  • ProcessWire Weekly #266
    In the 266th issue of ProcessWire Weekly we're going to take a closer look at ProcessWire 3.0.133 (dev), introduce a third party module called Repeater Images, and highlight a recently released site belonging to the Australian Antarctic Division. Read on!
    Weekly.pw / 15 June 2019
  • ProcessWire 3.0.133 core updates
    ProcessWire 3.0.133 adds a useful new $page->meta() method for a new type of page-specific persistent data storage, adds the ability for users to create their own bookmarks in Lister, and has a handy and time saving update for the asmSelect input type. Read on for all the details, examples and screenshots.
    Blog / 14 June 2019
  • Subscribe to weekly ProcessWire news

“ProcessWire is like a breath of fresh air. So powerful yet simple to build with and customise, and web editors love it too.” —Margaret Chatwin, Web developer