本文整理汇总了PHP中DataEdit::use_function方法的典型用法代码示例。如果您正苦于以下问题:PHP DataEdit::use_function方法的具体用法?PHP DataEdit::use_function怎么用?PHP DataEdit::use_function使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataEdit
的用法示例。
在下文中一共展示了DataEdit::use_function方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dataedit
function dataedit()
{
if ($this->uri->segment(5) === "1" && $this->uri->segment(4) === "do_delete") {
show_error("Please do not delete the first record, it's required by DataObject sample");
}
$this->rapyd->load("dataedit");
$edit = new DataEdit("IMPORTACIONES", "import");
$edit->back_url = site_url("import/importa/tabla");
$edit->numero = new autoUpdateField("Número", "numero");
$edit->expediente = new inputField("Expediente", "expediente");
$edit->fecha = new dateField("Fecha", "fecha");
$edit->proveed = new dropdownField("Proveedor", "proveed");
$edit->proveed->option("", "");
$edit->proveed->options("SELECT proveed, nombre FROM sprv ORDER BY nombre");
$edit->moneda = new dropdownField("Moneda", "moneda");
$edit->moneda->option("", "");
$edit->moneda->options("SELECT moneda, descrip FROM mone ORDER BY descrip");
$edit->cambio = new inputField("Tasa de Cambio", "cambio");
$edit->comenta = new editorField("Comentario", "comenta");
$edit->comente->rows = 10;
$edit->comente->cols = 50;
// $edit->title->rule = "trim|required|max_length[20]";
/*
$edit->body = new editorField("Body", "body");
$edit->body->rule = "required";
$edit->body->rows = 10;
$edit->author = new dropdownField("Author", "author_id");
$edit->author->option("","");
$edit->author->options("SELECT author_id, firstname FROM authors");
*/
$r_uri = "import/importa/importitem_grid/<#numero#>/list";
$edit->related = new iframeField("related", $r_uri, "210");
$edit->related->when = array("show", "modify");
$r_uri = "import/importa/importgext_grid/<#numero#>/list";
$edit->related2 = new iframeField("related2", $r_uri, "210");
$edit->related2->when = array("show", "modify");
/*
$edit->checkbox = new checkboxField("Public", "public", "y","n");
$edit->datefield = new dateField("Date", "datefield","eu");
*/
if ($this->uri->segment(4) === "1") {
$edit->buttons("modify", "save", "undo", "back");
} else {
$edit->buttons("modify", "save", "undo", "delete", "back");
}
$edit->use_function("callback_test");
// $edit->test = new freeField("Test", "test", "<callback_test><#article_id#>|3</callback_test>");
$edit->build();
$data["edit"] = $edit->output;
$data["modulo"] = "IMPORTACIONES";
//$this->_session_dump();
$content["lista"] = "\n <h3>Importaciones</h3>\n <div></div>\n <div class='line'></div>\n <a href='#' onclick='window.close()'>Cerrar</a>\n <div class='line'></div>\n<br><br><br>\n";
$content["content"] = $this->load->view('rapyd/dataedit', $data, true);
$content["rapyd_head"] = $this->rapyd->get_head();
$content["code"] = "";
$this->load->view('rapyd/tmpsolo', $content);
}
示例2: dataedit
function dataedit()
{
if ($this->uri->segment(5) === "1" && $this->uri->segment(4) === "do_delete") {
show_error("Please do not delete the first record, it's required by DataObject sample");
}
//dataedit//
$this->rapyd->load("dataedit");
$edit = new DataEdit("Article Detail", "articles");
$edit->back_url = site_url("inventario/crudsamples/filteredgrid");
$edit->title = new inputField("Title", "title");
$edit->title->rule = "trim|required|max_length[20]";
$edit->body = new editorField("Body", "body");
$edit->body->rule = "required";
$edit->body->rows = 10;
$edit->author = new dropdownField("Author", "itstra");
$edit->author->option("", "");
$edit->author->options("SELECT numero, codigo FROM itstra");
$r_uri = "inventario/crudsamples/comments_grid/<#article_id#>/list";
$edit->related = new iframeField("related", $r_uri, "210");
$edit->related->when = array("show", "modify");
$edit->checkbox = new checkboxField("Public", "public", "y", "n");
$edit->datefield = new dateField("Date", "datefield", "eu");
if ($this->uri->segment(4) === "1") {
$edit->buttons("modify", "save", "undo", "back");
} else {
$edit->buttons("modify", "save", "undo", "delete", "back");
}
$edit->use_function("callback_test");
$edit->test = new freeField("Test", "test", "<callback_test><#numero#>|3</callback_test>");
$edit->build();
$data["edit"] = $edit->output;
//enddataedit//
//$this->_session_dump();
$content["content"] = $this->load->view('rapyd/dataedit', $data, true);
$content["rapyd_head"] = $this->rapyd->get_head();
$content["code"] = highlight_code_file(THISFILE, "//dataedit//", "//enddataedit//");
$content["code"] .= '<br/><br/> <span style="color: #FF8000">//comments grid <br /></span><br/>';
$content["code"] .= highlight_code_file(THISFILE, "//commentsgrid//", "//endcommentsgrid//");
$content["code"] .= '<br/><br/> <span style="color: #FF8000">//comments edit <br /></span><br/>';
$content["code"] .= highlight_code_file(THISFILE, "//commentsedit//", "//endcommentsedit//");
$this->load->view('rapyd/template', $content);
}