public function overwriteForm($return, $returnfull) { $t = time(); $return = parent::overwriteForm($return, $returnfull); $return['prod_attribute_array'] = new Leap\View\InputAttribute("prod_stock_" . $t, "prod_attribute_array", "prod_attribute_array", $this->prod_attribute_array); $return['prod_pic'] = new Leap\View\InputGallery("prod_pic", "prod_pic", $this->prod_pic); $return['prod_active'] = new Leap\View\InputSelect($this->arrayYesNO, "prod_active", "prod_active", $this->prod_active); // $return['news_text'] = new Leap\View\InputTextArea("news_text", "news_text", $this->news_text); $return['prod_des'] = new Leap\View\InputTextArea("prod_des", "prod_des", $this->prod_des); $return['prod_stock'] = new Leap\View\InputText("hidden", "prod_stock_" . $t, "prod_stock", $this->prod_stock); $return['prod_app_id'] = new Leap\View\InputText("hidden", "prod_app_id" . $t, "prod_app_id", $this->prod_app_id); $return['prod_price'] = new Leap\View\InputPrice("prod_price", "prod_price", $this->prod_price); $return['prod_price_diskon'] = new Leap\View\InputPrice("prod_price_diskon", "prod_price_diskon", $this->prod_price_diskon); $p = new MProdCat(); if (count($p->tree_multi_user_constraint) > 0) { $where = array(); foreach ($p->tree_multi_user_constraint as $attr => $val) { $where[] = $attr . " = '" . $val . "'"; } $impWhere = implode(" AND ", $where); $arrPage = $p->getWhere($impWhere); } else { $arrPage = $p->getAll(); } // $arrPage = $p->getAll(); //category harus sesuai tree structurenya..... $arrNe = array(); foreach ($arrPage as $pp) { $arrNe[$pp->cat_id] = $pp->cat_name; } $return['prod_cat_id'] = new Leap\View\InputSelect($arrNe, "prod_cat_id", "prod_cat_id", $this->prod_cat_id); return $return; }