function showTab() { $tpl = DevblocksPlatform::getTemplateService(); $tpl_path = dirname(__FILE__) . '/templates/'; $tpl->assign('path', $tpl_path); $tpl->cache_lifetime = "0"; // Community sites $communities = DAO_Community::getList(); $tpl->assign('communities', $communities); // Tool Manifests $tools = DevblocksPlatform::getExtensions('usermeet.tool', false, true); $tpl->assign('tool_manifests', $tools); // Tool Instances $community_tools = array(); $instances = DAO_CommunityTool::getList(); foreach ($instances as $tool) { // Only tools with valid plugins if (!isset($tools[$tool->extension_id])) { continue; } if (!isset($community_tools[$tool->community_id])) { $community_tools[$tool->community_id] = array(); } $community_tools[$tool->community_id][$tool->code] = $tool; } $tpl->assign('community_tools', $community_tools); $tpl->display('file:' . $tpl_path . 'community/config/tab/index.tpl'); }
function showTab() { $tpl = DevblocksPlatform::getTemplateService(); $tpl_path = dirname(__FILE__) . '/templates/'; $tpl->assign('path', $tpl_path); $tpl->cache_lifetime = "0"; // Community sites $communities = DAO_Community::getList(); $tpl->assign('communities', $communities); // Community Tools + Widgets (Indexed) $community_addons = array(); foreach (array_keys($communities) as $idx) { $community_addons[$idx] = array('tools' => array(), 'widgets' => array()); } $community_tools = DAO_CommunityTool::getList(); foreach ($community_tools as $tool) { if (!isset($community_addons[$tool->community_id])) { continue; } $community_addons[$tool->community_id]['tools'][$tool->code] = $tool->extension_id; } // Tool Manifests $tools = DevblocksPlatform::getExtensions('usermeet.tool', false, true); $tpl->assign('tool_manifests', $tools); $tpl->assign('community_addons', $community_addons); $tpl->display('file:' . $tpl_path . 'community/config/tab/index.tpl'); }