JTable/save

From Joomla! Documentation
< JTable
Revision as of 16:39, 25 November 2008 by Batch1211 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Contents

Syntax

boolean save ($source, $order_filter='', $ignore='')

Parameters

Argument Data type Description Default
$source array Source array for binding to class vars. See JTable/bind.
$order_filter string Filter for the order updating. See JTable/reorder ''
$ignore mixed An array or space separated list of fields not to bind. See JTable/bind.

Returns

TRUE if completely successful, FALSE if partially or not succesful.

Description

JTable::save() - Combines several methods of the JTable Class.

  1. Triggers the bind() method of the object, and binds the $source array to the object. See JTable/bind
  2. Triggers the check() method of the object, and checks if all properties which have been previously been bound to the object are valid. See JTable/check
  3. Triggers the store() method of the object, and updates the row defined by the table key, or inserts a new record if the value of the table key equals 0. See JTable/store
  4. Triggers the checkin() method of the object (only if the table has the columns checked_out and checked_out_time ). See JTable/checkin
  5. If the $order_filter parameter is set, the reorder() method is triggered, compacting the ordering sequence of the selected records. See JTable/reorder

Preconditions

JTable is an abstract class. You need to write a child class, to use its functionality. See Part 4 of the MVC Tutorial

See also

Personal tools
Namespaces

Variants
Actions
Navigation
Joomla! Sites
Toolbox