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

Latest news

  • ProcessWire Weekly #553
    In the 553rd issue of ProcessWire Weekly we'll check out the latest weekly update from Ryan, introduce a new third party module called Text Synthesis, and more. Read on!
    Weekly.pw / 14 December 2024
  • Custom Fields Module
    This week we look at a new ProFields module named Custom Fields. This module provides a way to rapidly build out ProcessWire fields that contain any number of subfields/properties within them.
    Blog / 30 August 2024
  • Subscribe to weekly ProcessWire news

“Indeed, if ProcessWire can be considered as a CMS in its own right, it also offers all the advantages of a CMF (Content Management Framework). Unlike other solutions, the programmer is not forced to follow the proposed model and can integrate his/her ways of doing things.” —Guy Verville, Spiria Digital Inc.