本文整理汇总了PHP中field::setWithObjectsExtra方法的典型用法代码示例。如果您正苦于以下问题:PHP field::setWithObjectsExtra方法的具体用法?PHP field::setWithObjectsExtra怎么用?PHP field::setWithObjectsExtra使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类field
的用法示例。
在下文中一共展示了field::setWithObjectsExtra方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
foreach ($queryFieldModule as $field) {
$sortingField .= "<option value='" . $field['title'] . "'>" . $field['title'] . "</option>";
$dataModule = "";
$options = "<option value='='>=</option>" . "<option value='>'>></option>" . "<option value='>='>>=</option>" . "<option value='<'><</option>" . "<option value='<='><=</option>" . "<option value='!='>!=</option>" . "<option value='LIKE'>LIKE</option>" . "<option value='LIKEPER'>LIKE %...%</option>" . "<option value='NOTLIKE'>NOT LIKE</option>" . "<option value='IN'>IN(...)</option>" . "<option value='NOTIN'>NOT IN(...)</option>" . "<option value='ISNULL'>IS NULL</option>" . "<option value='ISNOTNULL'>IS NOT NULL</option>";
if (in_array($field['type'], $dateTypeArray)) {
$input = "<div class='input-group date date-widget' ><input type='text' class='form-control valueOperation' data-id='" . $field["id"] . "' />" . "<span class='input-group-addon'>\n <span class='glyphicon glyphicon-calendar'></span>\n </span></div>" . "";
$options = "<option value='='>=</option>" . "<option value='>'>></option>" . "<option value='>='>>=</option>" . "<option value='<'><</option>" . "<option value='<='><=</option>" . "<option value='!='>!=</option>" . "<option value='ISNULL'>IS NULL</option>" . "<option value='ISNOTNULL'>IS NOT NULL</option>";
} elseif ($field['type'] == "DynamicSelect") {
$field_ob = new field();
$field_ob->SetIdField();
$field_ob->SetNameField();
$field_ob->SetCssClass("valueOperation form-control");
$field_ob->SetTypeField($field['type']);
$plus = explode(',', $field['plus']);
$field_ob->SetExtra($plus);
$field_ob->setWithObjectsExtra(true);
$field_ob->setDataObjects(array("id" => $field["id"]));
$res = $field_ob->getField();
$dataModule = "data-module='" . $plus[0] . "'";
$input = "<div class='input-group' style='width:100%' >{$res}</div>";
$options = "<option value='='>=</option>" . "<option value='!='>!=</option>" . "<option value='IN'>IN(...)</option>" . "<option value='NOTIN'>NOT IN(...)</option>" . "<option value='ISNULL'>IS NULL</option>" . "<option value='ISNOTNULL'>IS NOT NULL</option>";
} else {
$input = "<div class='input-group' style='width:100%' ><input type='text' class='form-control valueOperation' data-id='" . $field["id"] . "' ></div>";
}
$operations .= "<tr>" . "<td><label>" . $utils->getConstant($field["title"]) . "</label></td>" . "<td><select data-field='" . $field["title"] . "' {$dataModule} data-type='" . $field['type'] . "' class='operation form-control' style='min-width:150px;' data-id='" . $field["id"] . "'>" . $options . "</select></td>" . "<td>{$input}</td>" . "</tr>";
}
$operations .= "</tbody></table></div><div class='col-sm-6'><table class='table table-striped table-bordered table-hover' style='margin-top:10px'><tbody><tr><tr><td colspan='3' class='danger'><label>" . $utils->getConstant("sorting") . "</label></td></tr>";
$operations .= "" . "<td><label>" . $utils->getConstant("OrderBy") . "</label></td>" . "<td colspan='2'><select class='form-control' id='WidgetSortBy'><option value=''>---------------------</option><option value='id'>id</option>{$sortingField}</select></td>" . "</tr>";
$operations .= "<tr>" . "<td><label>" . $utils->getConstant("OrderType") . "</label></td>" . "<td colspan='2'><select class='form-control' id='WidgetOrderBy'><option value=''>---------------------</option><option value='asc'>" . $utils->getConstant("asc") . "</option><option value='desc'>" . $utils->getConstant("desc") . "</option></select></td>" . "</tr>";
$operations .= "<tr>" . "<td><label>" . $utils->getConstant("Limit") . "</label></td>" . "<td colspan='2'><input class='form-control' id='WidgetLimit'></td>" . "</tr>";
$operations .= "</tbody></table></div></div>";