Created
September 14, 2013 05:41
-
-
Save svenvarkel/6559095 to your computer and use it in GitHub Desktop.
My_Custom_Model_Product
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
class My_Custom_Model_Product extends Mage_Catalog_Model_Product{ | |
use My_Custom_Trait_Extension_A_Model_Product, My_Custom_Trait_Extension_B_Model_Product; | |
public function doSomethingCustomerSpecific(){ | |
//here we do smth customer specific | |
// AND now it's possible to use methods from traits - | |
// it means - from Extension_A and Extension_B Product models | |
$this->fixSomethingByProduct(); | |
} | |
public function getSomethingFromSomewhere(){ | |
//Call method from Extension_A_Model_Product | |
$this->transformProductDescription(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment