Created
June 24, 2013 14:52
-
-
Save Shagshag/5850617 to your computer and use it in GitHub Desktop.
Override example with Prestashop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ObjectModel extends ObjectModelCore | |
{ | |
public function add($autodate = true, $nullValues = false) | |
{ | |
$result = parent::add($autodate, $nullValues); | |
if ($result) Module::hookExec('objectAdd', array('object' => $this)); | |
return $result; | |
} | |
public function update($autodate = true, $nullValues = false) | |
{ | |
$result = parent::update($autodate, $nullValues); | |
if ($result) Module::hookExec('objectUpdate', array('object' => $this)); | |
return $result; | |
} | |
public function delete($autodate = true, $nullValues = false) | |
{ | |
$result = parent::delete($autodate, $nullValues); | |
if ($result) Module::hookExec('objectDelete', array('object' => $this)); | |
return $result; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment