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?       Only hookable?    

Common

NameReturnSummary 
WireSaveableItems::added(Saveable $item)
None

Hook that runs right after a new item has been added.

WireSaveableItems::clone(Saveable $item)
bool Saveable

Create and return a cloned copy of this item

WireSaveableItems::cloneReady(Saveable $item, Saveable $copy)
None

Hook that runs right before item is to be cloned.

WireSaveableItems::cloned(Saveable $item, Saveable $copy)
None

Hook that runs right after an item has been cloned.

WireSaveableItems::delete(Saveable $item)
bool

Delete the provided item from the database

WireSaveableItems::deleteReady(Saveable $item)
None

Hook that runs right before item is to be deleted.

WireSaveableItems::deleted(Saveable $item)
None

Hook that runs right after an item has been deleted.

WireSaveableItems::error(string $text)
Wire WireSaveableItems

Record an error

 
WireSaveableItems::find($selectors)
WireArray

Find items based on Selectors or selector string

WireSaveableItems::get($key)
array mixed null Page Saveable Wire WireData

Get an item

 
WireSaveableItems::getAll()
WireArray

Return the WireArray that this DAO stores it's items in

 
WireSaveableItems::getIterator()
None 
WireSaveableItems::getSort()
string

Return the default name of the field that load() should sort by (default is none)

 
WireSaveableItems::getTable()
string

Return the name of the table that this DAO stores item records in

 
WireSaveableItems::has($item)
bool

Do we have the given item or item by given key?

 
WireSaveableItems::log($str)
WireLog

Save to activity log, if enabled in config

 
WireSaveableItems::makeBlankItem()
Saveable Wire

Return a new blank item

 
WireSaveableItems::makeItem()
Saveable WireData Wire

Make an item and populate with given data

 
WireSaveableItems::renameReady(Saveable $item, string $oldName, string $newName)
None

Hook that runs right before item is to be renamed.

WireSaveableItems::renamed(Saveable $item, string $oldName, string $newName)
None

Hook that runs right after an item has been renamed.

WireSaveableItems::save(Saveable $item)
bool

Save the provided item to database

WireSaveableItems::saveReady(Saveable $item)
None

Hook that runs right before item is to be saved.

WireSaveableItems::saved(Saveable $item)
None

Hook that runs right after an item has been saved.

WireSaveableItems::useFuel()
bool

Enforce no locally-scoped fuel for this class

 
WireSaveableItems::useLazy()
bool

Use 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.252