当前位置: 首页>>代码示例>>PHP>>正文


PHP field::setWithAdd方法代码示例

本文整理汇总了PHP中field::setWithAdd方法的典型用法代码示例。如果您正苦于以下问题:PHP field::setWithAdd方法的具体用法?PHP field::setWithAdd怎么用?PHP field::setWithAdd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在field的用法示例。


在下文中一共展示了field::setWithAdd方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getForm

 public function getForm($action)
 {
     global $allGroupAvilable;
     global $pageList;
     global $module_id;
     $res = "";
     $res .= "<div class='box box-danger form-horizontal'><div class='box-body'>";
     if ($this->steps == true) {
         $res .= $this->create_gen_path($_SESSION['cmsMID'], $this->stepsArray, $this->stepsPages);
     }
     if ($this->AsForm == true) {
         $res .= "<form method='post' class='{$this->cssForm}' name='{$this->nameForm}' id='{$this->idForm}'><input type='hidden' name='backLink' value='" . $_SERVER['HTTP_REFERER'] . "'>";
     }
     $res .= "<div class='Form-Field form-generate-voila {$this->cssForm}'>";
     $countColumns = 0;
     if ($this->countCell > 0) {
         $countColumns = round(count($this->columns) / $this->countCell);
         $res .= "<div class='{$this->cellClassWithCount}'>";
     }
     $i = 0;
     $classSubmit = "";
     $dataObjectForPageBuilder = "";
     foreach ($this->columns as $column) {
         if ($this->types[$column] == "pageBuilder") {
             $classSubmit = "SubmitPageBuilder";
             $currentGroup = $_REQUEST['gr_id_pg'];
             $dataObjectForPageBuilder = " data-cuuenr-file='" . basename($_SERVER["PHP_SELF"]) . "' data-cms-id='{$module_id}' data-avilable-groups='{$allGroupAvilable}' data-current-page='{$currentGroup}' data-list-page='{$pageList}' ";
         }
         if (!$countColumns) {
             $res .= "<div class='{$this->ClassMain}'>";
         }
         if ($countColumns > 0) {
             if (fmod($i, $countColumns) == 0 && $i != 0) {
                 $res .= "</div><div class='{$this->cellClassWithCount}'>";
             }
         }
         $i++;
         $res .= "<div class='form-group'>";
         $span = "";
         if ($this->requireds[$column] == 'required' || in_array($column, $this->requireds)) {
             $span = "<span class='red  required' >* </span>";
         } else {
             $span = "<span class=' req'>&nbsp; </span>";
         }
         $SubMainClass = $this->SubMain[0];
         $SubMainClass2 = $this->SubMain[2];
         $labelClass = "control-label";
         if ($this->types[$column] == "pageBuilder") {
             $SubMainClass = $SubMainClass2 = "col-sm-12";
             $labelClass = "";
         } else {
             if ($this->LangEffected[$column] != "") {
                 $lang_org = str_replace($this->LangEffected[$column] . "_", "", $column);
                 $orgin_col = str_replace("_" . $lang_org, "", $column);
                 $res .= "<label class='" . $SubMainClass . " {$labelClass}'>" . $span . $this->getConstant($orgin_col, $this->constants[$orgin_col]) . " (" . $this->getConstant($lang_org) . ")" . ": </label>";
             } else {
                 $res .= "<label class='" . $SubMainClass . " {$labelClass}'>" . $span . $this->getConstant($column, $this->constants[$column]) . ": </label>";
             }
         }
         $field_ob = new field();
         if ($this->types[$column] == 'map') {
             $field_ob->setMap($this->values[$column]);
         }
         $field_ob->SetIdField($column);
         $field_ob->SetNameField($column);
         $field_ob->SetCssClass($this->classes[$column] . " form-control");
         $field_ob->SetValueField($this->values[$column]);
         $field_ob->SetTypeField($this->types[$column]);
         $field_ob->SetTable($this->extendTables[$column][0]);
         $field_ob->SetTname($this->extendTables[$column][1]);
         $field_ob->SetTvalue($this->extendTables[$column][2]);
         $field_ob->setWhere($this->extendTables[$column][3]);
         $field_ob->SetRequiredField($this->requireds[$column]);
         if (!$this->extendTables[$column][4]) {
             $this->extendTables[$column][4] = true;
         }
         $field_ob->setWithAdd($this->extendTables[$column][4]);
         $field_ob->SetExtra($this->extra[$column]);
         $field_ob->SetInputLength($this->legths[$column]);
         $res .= "<div class='" . $SubMainClass2 . "'>";
         $res .= $field_ob->getField();
         $res .= "<small class='field-description'>" . $this->FieldDescription[$column] . "</small>";
         $res .= "</div></div>";
         // echo $this->tableName;
         //    global $fpdo;
         //  $get_description= $fpdo->from('cms_module_fields')->where("table_id='".$_SESSION['cmsMID']."'")->fetch();
         //  echo $get_description['description'];
         $res .= "<div class='hr'><hr></div>";
         if (!$countColumns) {
             $res .= "</div>";
         }
     }
     if ($this->countCell) {
         $res .= "</div>";
     }
     $res .= $this->AppendToForm;
     $res .= "  <div class='col-sm-12'>";
     $res .= "   <input type='hidden' value='{$action}' name='action' id='action'>";
     if ($this->backBtn == true) {
         $res .= $this->back($this->backLink);
//.........这里部分代码省略.........
开发者ID:VoilaVoila,项目名称:voilacms,代码行数:101,代码来源:GenerateFormField.php

示例2: GetListTable


//.........这里部分代码省略.........
         }
         $result .= "</tr>\n";
         $result .= "</thead>\n";
         $result .= "<tbody id='{$soratble}' class='sortable ui-sortable'>\n";
         $m = 1;
         if ($_REQUEST['action'] == 'add' && $this->isGridList == true) {
             if (count($this->types) > 0) {
                 $result .= "<tr>";
                 $result .= $this->getParametersToPassIt(true);
                 $result .= $this->getParametersToPassIt();
                 foreach ($this->columns as $col) {
                     $field_ob = new field();
                     $field_ob->SetIdField($col);
                     $field_ob->SetNameField($col);
                     $field_ob->SetCssClass($this->classes[$col]);
                     $required = $this->requireds[$col];
                     if ($required == "" && in_array($col, $this->requireds)) {
                         $required = "required";
                     }
                     $field_ob->SetRequiredField($required);
                     $field_ob->SetValueField($this->source[$col][3]);
                     $field_ob->SetTypeField($this->types[$col]);
                     $field_ob->SetTable($this->extendTables[$col][0]);
                     $field_ob->SetTname($this->extendTables[$col][1]);
                     $field_ob->SetTvalue($this->extendTables[$col][2]);
                     $field_ob->setWhere($this->extendTables[$col][3]);
                     $field_ob->WithLabel(false);
                     if (!$this->extendTables[$col][4]) {
                         $this->extendTables[$col][4] = true;
                     }
                     if (in_array($col, $this->parentAttr)) {
                         $field_ob->SetValueField($_REQUEST[$col]);
                     }
                     $field_ob->setWithAdd($this->extendTables[$col][4]);
                     $field_ob->SetExtra($this->extra[$col]);
                     $field_ob->SetInputLength($this->legths[$col]);
                     $result .= "<td>" . $field_ob->getField() . "</td>";
                 }
                 foreach ($this->extraLinks as $exlink) {
                     $result .= "<td></td>\n";
                 }
                 if ($this->active == true) {
                     $result .= "<td></td>\n";
                 }
                 $i_page = 0;
                 foreach ($query as $row_seo) {
                     if ($i_page < 1) {
                         if ($row_seo[$this->page_id] > 0) {
                             $result .= "<td></td>\n";
                             $i_page++;
                         }
                     }
                 }
                 $i_dublicate = 0;
                 foreach ($query as $row_dublicate) {
                     if ($i_dublicate < 1) {
                         if ($this->display == true) {
                             $result .= "<td></td>\n";
                             $i_dublicate++;
                         }
                     }
                 }
                 if ($this->special == true) {
                     $result .= "<td></td>\n";
                 }
                 if ($this->static != '') {
开发者ID:VoilaVoila,项目名称:voilacms,代码行数:67,代码来源:ListTable.php


注:本文中的field::setWithAdd方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。