Created
April 13, 2018 12:55
-
-
Save GreatPotato/2bc626fa203cf604bc98045eb00ff9e1 to your computer and use it in GitHub Desktop.
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 MyModule_Module extends Core_ModuleBase | |
{ | |
protected function createModuleInfo() | |
{ | |
return new Core_ModuleInfo( | |
'MyModule', | |
'Whatever...', | |
'Aaron Hodges' | |
); | |
} | |
public function subscribeEvents() | |
{ | |
Backend::$events->addEvent('shop:onExtendCustomerModel', $this, 'extend_customer_model'); | |
} | |
public function extend_customer_model() | |
{ | |
$customer->define_column('phone', 'Phone')->validation()>required('Please specify a phone number')->fn('trim'); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment