From 7beafebf7cb57991eb2289e6386e34ff3974cbd1 Mon Sep 17 00:00:00 2001 From: Sam Georges Date: Sat, 23 Aug 2014 09:41:48 +1000 Subject: [PATCH] getClassExtension -> asExtension (shorter syntax) --- modules/backend/controllers/EditorPreferences.php | 4 ++-- modules/backend/controllers/Users.php | 4 ++-- modules/system/controllers/MailTemplates.php | 2 +- modules/system/controllers/Updates.php | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/backend/controllers/EditorPreferences.php b/modules/backend/controllers/EditorPreferences.php index bc37ec44a..e73c695de 100644 --- a/modules/backend/controllers/EditorPreferences.php +++ b/modules/backend/controllers/EditorPreferences.php @@ -55,13 +55,13 @@ class EditorPreferences extends Controller $this->vars['language'] = 'css'; $this->vars['margin'] = 0; - $this->getClassExtension('Backend.Behaviors.FormController')->update(); + $this->asExtension('FormController')->update(); $this->pageTitle = Lang::get('backend::lang.editor.menu_label'); } public function index_onSave() { - return $this->getClassExtension('Backend.Behaviors.FormController')->update_onSave(); + return $this->asExtension('FormController')->update_onSave(); } public function formFindModelObject() diff --git a/modules/backend/controllers/Users.php b/modules/backend/controllers/Users.php index ac6b25f41..9c7cdd0c2 100644 --- a/modules/backend/controllers/Users.php +++ b/modules/backend/controllers/Users.php @@ -49,7 +49,7 @@ class Users extends Controller if ($context != 'myaccount' && $recordId == $this->user->id) return Redirect::to(Backend::url('backend/users/myaccount')); - return $this->getClassExtension('Backend.Behaviors.FormController')->update($recordId, $context); + return $this->asExtension('FormController')->update($recordId, $context); } /** @@ -68,7 +68,7 @@ class Users extends Controller */ public function myaccount_onSave() { - $result = $this->getClassExtension('Backend.Behaviors.FormController')->update_onSave($this->user->id, 'myaccount'); + $result = $this->asExtension('FormController')->update_onSave($this->user->id, 'myaccount'); /* * If the password or login name has been updated, reauthenticate the user diff --git a/modules/system/controllers/MailTemplates.php b/modules/system/controllers/MailTemplates.php index 290d8a124..4b8b5a04f 100644 --- a/modules/system/controllers/MailTemplates.php +++ b/modules/system/controllers/MailTemplates.php @@ -48,7 +48,7 @@ class MailTemplates extends Controller /* @todo Remove line if year >= 2015 */ if (!\System\Models\MailLayout::whereCode('default')->count()) { \Eloquent::unguard(); with(new \System\Database\Seeds\SeedSetupMailLayouts)->run(); } MailTemplate::syncAll(); - $this->getClassExtension('Backend.Behaviors.ListController')->index(); + $this->asExtension('ListController')->index(); $this->bodyClass = 'compact-container'; } diff --git a/modules/system/controllers/Updates.php b/modules/system/controllers/Updates.php index 72f5a233c..37890c3d5 100644 --- a/modules/system/controllers/Updates.php +++ b/modules/system/controllers/Updates.php @@ -59,7 +59,7 @@ class Updates extends Controller $this->vars['project_id'] = Parameters::get('system::project.id'); $this->vars['project_name'] = Parameters::get('system::project.name'); $this->vars['project_owner'] = Parameters::get('system::project.owner'); - return $this->getClassExtension('Backend.Behaviors.ListController')->index(); + return $this->asExtension('ListController')->index(); } /** @@ -69,7 +69,7 @@ class Updates extends Controller { $this->pageTitle = Lang::get('system::lang.plugins.manage'); PluginManager::instance()->clearDisabledCache(); - return $this->getClassExtension('Backend.Behaviors.ListController')->index(); + return $this->asExtension('ListController')->index(); } /**