From 992cf22c795100a4f42c17c38cf1aaa2029af279 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 21 Nov 2008 07:06:11 +0000 Subject: Revert module block approach --- core/libraries/Theme.php | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'core/libraries') diff --git a/core/libraries/Theme.php b/core/libraries/Theme.php index 642bfb87..4bd8237a 100644 --- a/core/libraries/Theme.php +++ b/core/libraries/Theme.php @@ -57,23 +57,7 @@ class Theme_Core { return new View("in_place_edit.html"); } - public function block($type, $module=null) { - $block = ORM::factory("block") - ->where("type", $type); - if (isset($module)) { - $block->where("module", $module); - } - $result = $block->find_all(); - $blocks = ""; - foreach ($result as $block) { - $blocks .= call_user_func($block->method, $this); - } - - return $blocks; - } - public function blocks() { - // @todo make type mandatory, its only optional while i try this out for slideshow /** @todo: make this data driven */ $blocks = array( 'carousel' => carousel::block($this), @@ -81,7 +65,6 @@ class Theme_Core { 'info' => info::block($this), 'gmaps' => gmaps::block($this), ); - kohana::Log("debug", print_r($blocks, true)); return $blocks; } } -- cgit v1.2.3