/** * Notify address observer * check status and notify observer. * * @param string $status Status [update,new] * @param string $table Database table * @param string $id Id * @param array $fieldArray Reference to the incoming fields * @param DataHandler $pObj Parent object * * @return void */ protected function notifyAddressObserver($status, $table, $id, array &$fieldArray, DataHandler &$pObj) { // get id if ($status == 'new') { $id = $pObj->substNEWwithIDs[$id]; } // if address is updated if ($status == 'update') { // notify observer \CommerceTeam\Commerce\Dao\AddressObserver::update($status, $id); } }
/** * This function is called by the Hook in * \CommerceTeam\Commerce\Controller\AddressesController before processing * update address operations. * * @param int $uid Uid * * @return void */ public function afterAddressEdit($uid) { // notify address observer \CommerceTeam\Commerce\Dao\AddressObserver::update('update', $uid); }