本文整理汇总了PHP中XoopsFormElementTray::addElementNotRef方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsFormElementTray::addElementNotRef方法的具体用法?PHP XoopsFormElementTray::addElementNotRef怎么用?PHP XoopsFormElementTray::addElementNotRef使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XoopsFormElementTray
的用法示例。
在下文中一共展示了XoopsFormElementTray::addElementNotRef方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: XoopsThemeQueryForm
function XoopsThemeQueryForm($title, $name, $action, $method = "post", $nome_pesquisa, $campos, $count = 3, $campos2 = "", $count2 = false)
{
$this->XoopsForm($title, $name, $action, $method);
if (!$campos2) {
$campos2 = $campos;
}
if ($count2 === false) {
$count2 = $count;
}
$this->addElement(new XoopsFormLabel("Pesquisa:"));
for ($i = 0; $i < $count; $i++) {
$buscaRow = new XoopsFormElementTray("   {$i} -->");
$checkbox = new XoopsFormCheckBox("", "where[{$i}][ativa]", "true");
$checkbox->addOption("Ativar");
if ($i == 0) {
$checkbox->setValue("Ativar");
}
$buscaRow->addElementNotRef($checkbox);
$campo = new XoopsFormSelect("", "where[{$i}][campo]", "url");
foreach ($campos as $key => $value) {
$campo->addOption($value);
}
$buscaRow->addElementNotRef($campo);
$buscaRow->addElementNotRef(new XoopsFormSelectSqlMatch("", "where[{$i}][tipo]"));
$buscaRow->addElementNotRef(new XoopsFormText("", "where[{$i}][pesquisa]", 20, 100));
$buscaRow->addElementNotRef(new XoopsFormSelectSqlAnd("", "where[{$i}][and]"));
$this->addElementNotRef($buscaRow);
}
if ($count2 > 0) {
$this->addElement(new XoopsFormLabel("Ordenação:"));
for ($i = 0; $i < $count2; $i++) {
$ordemRow = new XoopsFormElementTray("   {$i} -->");
$checkbox2 = new XoopsFormCheckBox("", "order[{$i}][ativa]", "true");
$checkbox2->addOption("Ativar");
if ($i == 0) {
$checkbox2->setValue("Ativar");
}
$ordemRow->addElementNotRef($checkbox2);
$campo2 = new XoopsFormSelect("", "order[{$i}][campo]", "url");
foreach ($campos2 as $key => $value) {
$campo2->addOption($value);
}
$ordemRow->addElementNotRef($campo2);
$ordemRow->addElementNotRef(new XoopsFormSelectSqlOrder("", "order[{$i}][tipo]"));
$this->addElementNotRef($ordemRow);
}
}
$checkbox3 = new XoopsFormCheckBox("Mostrar lista detalhada", "detalhes", "");
$checkbox3->addOption("Sim", "Sim");
$this->addElement($checkbox3);
$this->addElement(new XoopsFormButton(" ", "pesquisa[{$nome_pesquisa}]", "Pesquisar", "submit", true));
}