本文整理匯總了PHP中FieldSet::addField方法的典型用法代碼示例。如果您正苦於以下問題:PHP FieldSet::addField方法的具體用法?PHP FieldSet::addField怎麽用?PHP FieldSet::addField使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FieldSet
的用法示例。
在下文中一共展示了FieldSet::addField方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: loadEntities
//.........這裏部分代碼省略.........
$columnObj->setLabel((string) $column['label']);
$fieldsetObj->addColumn($columnObj);
}
} elseif ($child->getName() == "FieldRow") {
$fieldrow = $child;
$fieldRowObj = new FieldRow($fieldsetObj, (string) $fieldrow['label']);
$fieldRowObj->setColon((string) $fieldrow['colon'] == '' || (string) $fieldrow['colon'] == '1');
$fieldRowObj->setHelp((string) $fieldrow['help'] == '1');
$fieldRowObj->setEmphasize((string) $fieldrow['emphasize'] == '1');
$fieldRowObj->setDataGroup((string) $fieldrow['datagroup']);
foreach ($fieldrow->Field as $field) {
$fieldObj = new Field($fieldsetObj, (int) $field['position'], (int) $field['data'], (string) $field['label']);
$fieldObj->setUsage((string) $field['usage']);
$fieldObj->setPrompt((string) $field['prompt']);
$fieldObj->setNewline((string) $field['newline'] == '' || (string) $field['newline'] == '1');
$fieldObj->setRequired((string) $field['required'] == '1');
$fieldObj->setVisibleRequired((string) $field['visibleRequired'] == '1');
$fieldObj->setColon((string) $field['colon'] == '' || (string) $field['colon'] == '1');
$fieldObj->setUnderlabel((string) $field['underlabel'] == '1');
$fieldObj->setHelp((string) $field['help'] == '1');
$fieldObj->setEmphasize((string) $field['emphasize'] == '1');
$fieldObj->setExplanation((string) $field['explanation']);
$fieldObj->setExpanded((string) $field['expanded'] == '1');
if ($field->PreNote) {
$noteObj = new FieldNote($this);
$noteObj->setText((string) $field->PreNote);
$fieldObj->setPreNote($noteObj);
}
if ($field->PostNote) {
$noteObj = new FieldNote($this);
$noteObj->setText((string) $field->PostNote);
$fieldObj->setPostNote($noteObj);
}
$fieldRowObj->addField($fieldObj);
}
$fieldsetObj->addField($fieldRowObj);
} elseif ($child->getName() == "Field") {
$field = $child;
$fieldObj = new Field($fieldsetObj, (int) $field['position'], (int) $field['data'], (string) $field['label']);
$fieldObj->setUsage((string) $field['usage']);
$fieldObj->setPrompt((string) $field['prompt']);
$fieldObj->setNewline((string) $field['newline'] == '' || (string) $field['newline'] == '1');
$fieldObj->setRequired((string) $field['required'] == '1');
$fieldObj->setVisibleRequired((string) $field['visibleRequired'] == '1');
$fieldObj->setColon((string) $field['colon'] == '' || (string) $field['colon'] == '1');
$fieldObj->setUnderlabel((string) $field['underlabel'] == '1');
$fieldObj->setHelp((string) $field['help'] == '1');
$fieldObj->setEmphasize((string) $field['emphasize'] == '1');
$fieldObj->setExplanation((string) $field['explanation']);
$fieldObj->setExpanded((string) $field['expanded'] == '1');
if ($field->PreNote) {
$noteObj = new FieldNote($this);
$noteObj->setText((string) $field->PreNote);
$fieldObj->setPreNote($noteObj);
}
if ($field->PostNote) {
$noteObj = new FieldNote($this);
$noteObj->setText((string) $field->PostNote);
$fieldObj->setPostNote($noteObj);
}
$fieldsetObj->addField($fieldObj);
}
}
$panelObj->addFieldSet($fieldsetObj);
} elseif ($block->getName() == "BlockInfo") {
$blockinfo = $block;