function fetchTienIchTemplate($tienIchIds, $templatePath, $templateName, $listAllFlag = true, $lang) { // TODO: remove hard code // $tienIchIds = '1-1,1-2,2-6'; $data = null; // $lang = ilandCommonUtils::getLanguage(); // lay tat ca du lieu tien ich $allList = U_ReModelProperties::layDanhSachTienIch($lang); $data = U_ReModelProperties::parseTienIch($tienIchIds, $allList, $listAllFlag); // fetch template tien ich $template = new JView(); $template->addTemplatePath($templatePath); $template->assignRef('allFlag', $listAllFlag); $template->assignRef('tienIchAllList', $data); $template->setLayout($templateName); return $template->loadTemplate(); return $data; }