public function save(Application_Model_Products_ProductImage $image) { //check for existing order number $image->imageOrder = $this->fetchOrderNumber($image); Zend_Debug::dump($image); return parent::save($image); }
public function save(Application_Model_Users_UserPendingRewardPointAndBalanceTracking $pendingTracking) { //new pendingTrackingDefaults if (($uniqueID = $pendingTracking->userPendingRewardPointAndBalanceTrackingUniqueID) === null) { $pendingTracking->dateCreated = date('Y-m-d H:i:s'); //this requirs that the abstract method to support the createUniqueID() methods. $pendingTracking->userPendingRewardPointAndBalanceTrackingUniqueID = $this->createUniqueID(); } return parent::save($pendingTracking); }
public function save(Application_Model_Products_ProductInventory $productInventory) { //pre save //public $inventoryReference; //public $uniqueIdentifierForJS; need to set unique id; echo 'presave'; $productInventory->productInventoryUniqueID = $this->createUniqueID(); return parent::save($productInventory); //echo 'postsave'; //post save }
public function save(Application_Model_Users_PasswordReset $reset) { // create a uniqueID if it doesn't have one $uniqueIDColumn = $this->getDbTable()->uniqueIDColumn; if ($reset->{$uniqueIDColumn} === null) { $reset->{$uniqueIDColumn} = $this->createUniqueID(); } // set expiration date (30 minutes from now) $timeSpan = 60 * 30; $reset->expiration = date('Y-m-d H:i:s', time() + $timeSpan); // call the parent funciton return parent::save($reset); }
public function save(Application_Model_Products_Product $product) { //pre save echo 'presave'; if (($uniqueID = $product->productUniqueID) === NULL) { $product->productUniqueID = $this->createUniqueID(); } else { echo 'unique id is: ' . $uniqueID; } return parent::save($product); //echo 'postsave'; //post save }
public function save(Application_Model_Stores_Store $store) { if (is_array($store)) { throw new Exception('Saving an array of stores is not yet supported'); } // new store defaults if (($uniqueID = $store->storeUniqueID) === null) { $store->storeUniqueID = $this->createUniqueID(); } // create a nice store name for urls if (!isset($store->storeName)) { $store->storeName = $this->createStoreName($store->storeDisplayName); } parent::save($store); }
public function save(Application_Model_Users_User $user) { // right now users can only be saved one at a time if (is_array($user)) { throw new Exception('Saving an array of users in not yet supported'); } // Generate password crypt and salt IF password provided if ($user->password && $user->password != '') { $user->salt = $this->generateSalt(); $user->password = $this->saltHashPassword($user->password, $user->salt); } else { if ($user->password == '') { unset($user->password); } } // new user defaults if (($uniqueID = $user->userUniqueID) === null) { $user->userUniqueID = $this->createUniqueID(); } // call parent function parent::save($user); }
public function save(Application_Model_Products_ProductColor $productColor) { //pre save echo 'presave'; return parent::save($productColor); }
public function save(Application_Model_Users_AccountRewardPointsAndBalanceSummary $accountRewardPointsAndBalanceSummary) { parent::save($accountRewardPointsAndBalanceSummary); }