當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FieldSet::addColumn方法代碼示例

本文整理匯總了PHP中FieldSet::addColumn方法的典型用法代碼示例。如果您正苦於以下問題:PHP FieldSet::addColumn方法的具體用法?PHP FieldSet::addColumn怎麽用?PHP FieldSet::addColumn使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FieldSet的用法示例。


在下文中一共展示了FieldSet::addColumn方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: loadEntities


//.........這裏部分代碼省略.........
     if ($simulator->Steps) {
         $step0 = false;
         foreach ($simulator->Steps->Step as $step) {
             $stepObj = new Step($this, (int) $step['id'], (string) $step['name'], (string) $step['label'], (string) $step['template']);
             if ($stepObj->getId() == 0) {
                 $step0 = true;
             }
             $stepObj->setOutput((string) $step['output']);
             $stepObj->setDescription((string) $step->Description);
             $stepObj->setDynamic((string) $step['dynamic'] == '1');
             foreach ($step->Panels->Panel as $panel) {
                 $panelObj = new Panel($stepObj, (int) $panel['id']);
                 $panelObj->setName((string) $panel['name']);
                 $panelObj->setLabel((string) $panel['label']);
                 foreach ($panel->children() as $block) {
                     if ($block->getName() == "FieldSet") {
                         $fieldset = $block;
                         $fieldsetObj = new FieldSet($panelObj, (int) $fieldset['id']);
                         $fieldsetObj->setLegend((string) $fieldset->Legend);
                         if ((string) $fieldset['disposition'] != "") {
                             $fieldsetObj->setDisposition((string) $fieldset['disposition']);
                         }
                         if ((string) $fieldset['display'] != "") {
                             $fieldsetObj->setDisplay((string) $fieldset['display']);
                         }
                         if ((string) $fieldset['popinLink'] != "") {
                             $fieldsetObj->setPopinLink((string) $fieldset['popinLink']);
                         }
                         foreach ($fieldset->children() as $child) {
                             if ($child->getName() == "Columns") {
                                 foreach ($child->Column as $column) {
                                     $columnObj = new Column(null, (int) $column['id'], (string) $column['name'], (string) $column['type']);
                                     $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);
開發者ID:eureka2,項目名稱:g6k,代碼行數:67,代碼來源:Simulator.php


注:本文中的FieldSet::addColumn方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。