Permalink
Browse files

API CHANGE Removed support for extraDBFields method in DataExtension,…

… please ensure you are using extraStatics on your extension classes
  • Loading branch information...
1 parent 49267db commit 71c2a2286acb2a0e1f0d3c32b81d8cb0a6b4103c @halkyon halkyon committed Mar 9, 2012
Showing with 3 additions and 11 deletions.
  1. +3 −11 model/DataExtension.php
View
@@ -51,21 +51,13 @@ public static function load_extra_statics($class, $extension) {
return;
}
- // @deprecated 2.4 - use extraStatics() now, not extraDBFields()
- if(method_exists($extensionClass, 'extraDBFields')) {
- Deprecation::notice('2.4', 'DataExtension::extraDBFields() is deprecated. Please use extraStatics() instead.');
- $extraStaticsMethod = 'extraDBFields';
- } else {
- $extraStaticsMethod = 'extraStatics';
- }
-
// If the extension has been manually applied to a subclass, we should ignore that.
if(Object::has_extension(get_parent_class($class), $extensionClass)) return;
// If there aren't any extraStatics we shouldn't try to load them.
- if (!method_exists($extensionClass, $extraStaticsMethod) ) return;
-
- $statics = call_user_func(array(singleton($extensionClass), $extraStaticsMethod), $class, $extension);
+ if(!method_exists($extensionClass, 'extraStatics')) return;
+
+ $statics = call_user_func(array(singleton($extensionClass), 'extraStatics'), $class, $extension);
if($statics) {
foreach($statics as $name => $newVal) {

0 comments on commit 71c2a22

Please sign in to comment.