Previous Page
rewind()

Solar_Model_Nodes_Record
save()

Next Page
saveInTransaction()

save()

public bool save ( array $data default NULL )

Saves this record and all related records to the database, inserting or updating as needed.

Inherited from Solar_Sql_Model_Record.

Parameters

  • (array) $data: An associative array of data to merge with existing record data.

Returns

  • (bool) True on success, false on failure.

Description

Saves this record and all related records to the database, inserting or updating as needed.

Hook methods:

  1. _preSave() runs before all save operations.

  2. _preInsert() and _preUpdate() run before the insert or update.

  3. As part of the model insert()/update() logic, filter() gets called, which itself has _preFilter() and _postFilter() hooks.

  4. _postInsert() and _postUpdate() run after the insert or update.

  5. _postSave() runs after all save operations, but before related records are saved.

  6. _preSaveRelated() runs before saving related records.

  7. Each related record is saved, invoking the save() routine with all its hooks on each related record.

  8. _postSaveRelated() runs after all related records are saved.