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)
array mixed null Page Saveable Wire WireDataGet an item 
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)
boolDo we have the given item or item by given key? 
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::makeItem()
Saveable WireData WireMake an item and populate with given data 
WireSaveableItems::renameReady(Saveable $item, string $oldName, string $newName)
(nothing)Hook that runs right before item is to be renamed.
WireSaveableItems::renamed(Saveable $item, string $oldName, string $newName)
(nothing)Hook that runs right after an item has been renamed.
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 
WireSaveableItems::useLazy()
boolUse lazy loading for this type? 

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.244

Latest news

  • ProcessWire Weekly #557
    In the 557th issue of ProcessWire Weekly we're going to share the latest core development news, introduce a new third party module, and more. Read on!
    Weekly.pw / 12 January 2025
  • ProcessWire 3.0.244 new main/master version
    ProcessWire 3.0.244 is our newest main/master/stable version. It's been more than a year in the making and is packed with tons of new features, issue fixes, optimizations and more. This post covers all the details.
    Blog / 18 January 2025
  • Subscribe to weekly ProcessWire news

“Yesterday I sent the client a short documentation for their ProcessWire-powered website. Today all features already used with no questions. #cmsdoneright—Marc Hinse, Web designer/developer