/** * Fetch items data for the product and build the rendering. * * @param int $id Product id * @param int $langId * * @return string */ public function getAssociatedItems($id, $langId) { (string) ($html = ""); $listArray = array(); $select = $this->getAll($langId, false); $select->where($this->_constraint . ' = ?', $id)->order('II_Name'); $data = $this->_db->fetchAll($select); $TITLE = 'Items(associez les items aux produits dans la GESTION DES ITEMS)'; foreach ($data as $key => $item) { $listArray[$key][] = $item['II_Name']; } $html = Cible_FunctionsGeneral::generateHTMLTable($TITLE, array(array('Title' => '')), $listArray); return $html; }