From 19cb27c9a4489c357c0e516c69ebcb218f8832c1 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Tue, 29 Sep 2009 15:07:53 -0700 Subject: change the block_manager api so that the theme is passed into the get method. convert info to the new sidebar block approach --- modules/info/helpers/info_block.php | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 modules/info/helpers/info_block.php (limited to 'modules/info/helpers/info_block.php') diff --git a/modules/info/helpers/info_block.php b/modules/info/helpers/info_block.php new file mode 100644 index 00000000..558c32f1 --- /dev/null +++ b/modules/info/helpers/info_block.php @@ -0,0 +1,39 @@ + t("Metadata")); + } + + static function get($block_id, $theme) { + $block = new Block(); + switch ($block_id) { + case "metadata": + if ($theme->item()) { + $block = new Block(); + $block->css_id = "gMetadata"; + $block->title = $theme->item()->is_album() ? t("Album Info") : t("Photo Info"); + $block->content = new View("info_block.html"); + } + break; + } + return $block; + } +} \ No newline at end of file -- cgit v1.2.3