function tagFormData($Item = array()) { $srcItem = $Item; $call = $this->attr("call"); $vars = $this->attr("vars"); if ($vars > "") { $Item = attrAddData($vars, $Item); } $from = $this->attr("from"); if ($from > "") { $Item = $Item[$from]; } $json = $this->attr("json"); if ($json > "") { $Item = json_decode($json, true); } $item = $this->attr("item"); $mode = $this->attr("data-mode"); if ($mode == "") { $mode = "show"; } $form = $this->attr("form"); if ($form > "") { formCurrentInclude($form); $datatype = "file"; $func = $form . "DataType"; if (is_callable($func)) { $datatype = $func(); } $ReadItem = $datatype . "ReadItem"; if ($item > "") { $Item = $ReadItem($form, $item); } if ($vars > "") { $Item = attrAddData($vars, $Item); } } $field = $this->attr("field"); if ($field > "") { $tmparr = json_decode($Item[$field], true); if (is_array($tmparr)) { $Item = $tmparr; unset($tmparr); } else { $Item = $Item[$field]; } } if (is_callable($call)) { $Item = $call($Item); } if (is_array($srcItem)) { foreach ($srcItem as $k => $v) { $Item["%{$k}"] = $v; } unset($v); } $Item = aikiCallFormFunc("BeforeShowItem", $Item, $form, $mode); $this->contentSetData($Item); //$this->html(clearValueTags($this->html())); }
function aikiBeforeShowItem($Item, $mode = "show", $form = null) { return aikiCallFormFunc("BeforeShowItem", $Item, $form, $mode); }