echo '<br />' . $header->show(); echo '<p>' . $this->objLanguage->code2Txt('mod_context_selectcontextpluginsabs', 'context', array('plugins' => 'plugins'), 'Select the [-plugins-] you would like to use in your [-context-]') . ':</p>'; $form = new form('updateplugins', $this->uri(array('action' => 'savestep4'))); $table = $this->newObject('htmltable', 'htmlelements'); $objIcon = $this->newObject('geticon', 'htmlelements'); $counter = 0; $newPlugins = array(); foreach ($plugins as $plugin) { $newPlugins[$plugin['title']] = $plugin; } ksort($newPlugins); foreach ($newPlugins as $plugin) { $counter++; $checkbox = new checkbox('plugins[]'); $checkbox->setValue($plugin['module_id']); $checkbox->setId('module_' . $plugin['module_id']); if (in_array($plugin['module_id'], $contextModules)) { $checkbox->setChecked(TRUE); } $objIcon->setModuleIcon($plugin['module_id']); if ($counter % 2 == 1) { $table->startRow(); } $table->addCell($checkbox->show(), 20); $label = new label($objIcon->show(), 'module_' . $plugin['module_id']); $table->addCell($label->show(), 30); $label = new label('<strong>' . $plugin['title'] . '</strong><br />' . $plugin['description'], 'module_' . $plugin['module_id']); $table->addCell($label->show() . '<br /><br />'); if ($counter % 2 == 2) { $table->endRow(); }