|
|
@@ -1499,6 +1499,17 @@ class Model extends Object implements CakeEventListener {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * This function is a convenient wrapper class to create(false) and, as the name suggests, clears the id, data, and validation errors.
|
|
|
+ *
|
|
|
+ * @return always boolean TRUE upon success
|
|
|
+ * @see Model::create()
|
|
|
+ */
|
|
|
+ public function clear() {
|
|
|
+ $this->create(false);
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+/**
|
|
|
* Returns a list of fields from the database, and sets the current model
|
|
|
* data (Model::$data) with the record found.
|
|
|
*
|