WireSaveableItems class

Located in file /wire/core/WireSaveableItems.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 WireSaveableItems class also inherits all the methods and properties of: Wire.

Show class?             Show args?        

Common

NameReturnSummary 
WireSaveableItems::added(Saveable $item)
(nothing)Hook that runs right after a new item has been added.
WireSaveableItems::clone(Saveable $item)
bool SaveableCreate and return a cloned copy of this item
WireSaveableItems::cloneReady(Saveable $item, Saveable $copy)
(nothing)Hook that runs right before item is to be cloned.
WireSaveableItems::cloned(Saveable $item, Saveable $copy)
(nothing)Hook that runs right after an item has been cloned.
WireSaveableItems::delete(Saveable $item)
boolDelete the provided item from the database
WireSaveableItems::deleteReady(Saveable $item)
(nothing)Hook that runs right before item is to be deleted.
WireSaveableItems::deleted(Saveable $item)
(nothing)Hook that runs right after an item has been deleted.
WireSaveableItems::error(string $text)
Wire WireSaveableItemsRecord an error
WireSaveableItems::find($selectors)
WireArrayFind items based on Selectors or selector string
WireSaveableItems::get($key)
(nothing) 
WireSaveableItems::getAll()
WireArrayReturn the WireArray that this DAO stores it's items in 
WireSaveableItems::getIterator()
(nothing) 
WireSaveableItems::getSort()
stringReturn the default name of the field that load() should sort by (default is none) 
WireSaveableItems::getTable()
stringReturn the name of the table that this DAO stores item records in 
WireSaveableItems::has($item)
(nothing) 
WireSaveableItems::load(WireArray $items)
WireArray
WireSaveableItems::log($str)
WireLogSave to activity log, if enabled in config 
WireSaveableItems::makeBlankItem()
Saveable WireReturn a new blank item 
WireSaveableItems::save(Saveable $item)
boolSave the provided item to database
WireSaveableItems::saveReady(Saveable $item)
(nothing)Hook that runs right before item is to be saved.
WireSaveableItems::saved(Saveable $item)
(nothing)Hook that runs right after an item has been saved.
WireSaveableItems::useFuel()
boolEnforce no locally-scoped fuel for this class 

Additional methods and properties

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

API reference based on ProcessWire core version 3.0.130

Twitter updates

  • New post: Quietly and without interruption this week, the ProcessWire.com website (and all subdomains) moved from a single static server to a load-balanced multi-server environment, giving us even more horsepower and redundancy than before— More
    19 April 2019
  • New post: With ProcessWire 3.0.130, this week we’ll take a detailed look at a few useful new API additions made in the last few weeks, along with examples of each—More
    12 April 2019
  • New post: This week ProcessWire ProMailer has been released, plus we’ve got a nice upgrade in our community support forum, and more— More
    15 March 2019

Latest news

  • ProcessWire Weekly #258
    In the 258th issue of ProcessWire Weekly we'll cover a hosting upgrade for the processwire.com site and it's subdomains, introduce PW Review and Terminal module, and feature the new site of O'Neil Cinema. Read on!
    Weekly.pw / 20 April 2019
  • ProcessWire.com website hosting upgrades
    Quietly and without interruption this week, our whole website moved from a single static server to a load-balanced multi-server environment, giving us even more horsepower and redundancy than before.
    Blog / 19 April 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