"; foreach($extensions as $extension) { $ext_name = $extension->ext_name; $h_name = empty($extension->name) ? $ext_name : html_escape($extension->name); $h_email = html_escape($extension->email); $h_link = isset($extension->link) ? "link)."\">Info" : ""; $h_doc = isset($extension->documentation) ? "ext_name))."\">Help" : ""; $h_author = html_escape($extension->author); $h_description = html_escape($extension->description); $h_enabled = $extension->enabled ? " checked='checked'" : ""; $html .= " " . ( empty($h_email) ? "" : "" ) . " "; } $html .= "
NameAuthorDescriptionLinksEnabled
$h_name$h_author$h_author$h_description $h_link $h_doc
"; $page->set_title("Extensions"); $page->set_heading("Extensions"); $page->add_block(new NavBlock()); $page->add_block(new Block("Extension Manager", $html)); } public function display_blocks(Page $page, $extensions) { $n = 0; $col_1 = ""; $col_2 = ""; foreach($extensions as $extension) { $ext_name = $extension->ext_name; $h_name = empty($extension->name) ? $ext_name : html_escape($extension->name); $h_email = html_escape($extension->email); $h_link = isset($extension->link) ? "link)."\">Original Site" : ""; $h_doc = isset($extension->documentation) ? "ext_name))."\">Documentation" : ""; $h_author = html_escape($extension->author); $h_description = html_escape($extension->description); $h_enabled = $extension->enabled ? " checked='checked'" : ""; $h_author_link = empty($h_email) ? "$h_author" : "$h_author"; $html = "

$h_name
By $h_author_link Enabled: 
$h_description

$h_link $h_doc

"; if($n++ % 2 == 0) { $col_1 .= $html; } else { $col_2 .= $html; } } $html = "

$col_1$col_2
"; $page->set_title("Extensions"); $page->set_heading("Extensions"); $page->add_block(new NavBlock()); $page->add_block(new Block("Extension Manager", $html)); } public function display_doc(Page $page, ExtensionInfo $info) { $html = "
".$info->documentation."
"; $page->set_title("Documentation for ".html_escape($info->name)); $page->set_heading(html_escape($info->name)); $page->add_block(new NavBlock()); $page->add_block(new Block("Documentation", $html)); } } ?>