diff options
author | Bharat Mediratta <bharat@menalto.com> | 2010-11-28 11:27:25 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2010-11-28 11:27:25 -0800 |
commit | eb010554ff963a1f73661bf96d99697abb7dfde4 (patch) | |
tree | cabf85c2dc223cfbb2f649b1c45adfe04ba3e70a /modules/gallery/helpers/block_manager.php | |
parent | 76b6daefaa4009fdd8de72b8f25259200a66d477 (diff) |
Replace self::func() with <helper_name>::func() for all public APIs
and constants to make overloading easier. Fixes #1510.
Diffstat (limited to 'modules/gallery/helpers/block_manager.php')
-rw-r--r-- | modules/gallery/helpers/block_manager.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/modules/gallery/helpers/block_manager.php b/modules/gallery/helpers/block_manager.php index 4dcd6c32..2237b702 100644 --- a/modules/gallery/helpers/block_manager.php +++ b/modules/gallery/helpers/block_manager.php @@ -27,10 +27,10 @@ class block_manager_Core { } static function add($location, $module_name, $block_id) { - $blocks = self::get_active($location); + $blocks = block_manager::get_active($location); $blocks[rand()] = array($module_name, $block_id); - self::set_active($location, $blocks); + block_manager::set_active($location, $blocks); } static function activate_blocks($module_name) { @@ -38,25 +38,25 @@ class block_manager_Core { if (method_exists($block_class, "get_site_list")) { $blocks = call_user_func(array($block_class, "get_site_list")); foreach (array_keys($blocks) as $block_id) { - self::add("site_sidebar", $module_name, $block_id); + block_manager::add("site_sidebar", $module_name, $block_id); } } } static function remove($location, $block_id) { - $blocks = self::get_active($location); + $blocks = block_manager::get_active($location); unset($blocks[$block_id]); - self::set_active($location, $blocks); + block_manager::set_active($location, $blocks); } static function remove_blocks_for_module($location, $module_name) { - $blocks = self::get_active($location); + $blocks = block_manager::get_active($location); foreach ($blocks as $key => $block) { if ($block[0] == $module_name) { unset($blocks[$key]); } } - self::set_active($location, $blocks); + block_manager::set_active($location, $blocks); } static function deactivate_blocks($module_name) { @@ -64,14 +64,14 @@ class block_manager_Core { if (method_exists($block_class, "get_site_list")) { $blocks = call_user_func(array($block_class, "get_site_list")); foreach (array_keys($blocks) as $block_id) { - self::remove_blocks_for_module("site_sidebar", $module_name); + block_manager::remove_blocks_for_module("site_sidebar", $module_name); } } if (method_exists($block_class, "get_admin_list")) { $blocks = call_user_func(array($block_class, "get_admin_list")); foreach (array("dashboard_sidebar", "dashboard_center") as $location) { - self::remove_blocks_for_module($location, $module_name); + block_manager::remove_blocks_for_module($location, $module_name); } } } @@ -99,7 +99,7 @@ class block_manager_Core { } static function get_html($location, $theme=null) { - $active = self::get_active($location); + $active = block_manager::get_active($location); $result = ""; foreach ($active as $id => $desc) { if (method_exists("$desc[0]_block", "get")) { |