+ function addRowsIcon($id, $campos = array(), $link = null, $lugar = 'append') {
+ if (is_string($campos)) {
+ $campos = array($campos);
+ }
+ if (!$link) {
+ $link = @$_SERVER['PHP_SELF'];
+ }
+ if (is_string($link)) {
+ $link = new MECON_HTML_Link($link, '');
+ }
+ switch ($id) {
+ case 'modificar':
+ $img = new MECON_HTML_Image('/MECON/images/general_modificar', '(M)');
+ $link->addContents($img);
+ foreach ($campos as $campo) {
+ $link->setGetVar($this->_getVarPrefix.$campo, null);
+ }
+ $this->addRowsData($link, array(), $lugar);
+ break;
+ case 'no_modificar':
+ $img = new MECON_HTML_Image('/MECON/images/general_modificar_des', '(-)');
+ $this->addRowsData($img, array(), $lugar);
+ break;
+ case 'borrar':
+ $img = new MECON_HTML_Image('/MECON/images/general_eliminar', '(B)');
+ $link->addContents($img);
+ foreach ($campos as $campo) {
+ $link->setGetVar($this->_getVarPrefix.$campo, null);
+ }
+ $this->addRowsData($link, array(), $lugar);
+ break;
+ case 'no_borrar':
+ $img = new MECON_HTML_Image('/MECON/images/general_eliminar_des', '(-)');
+ $this->addRowsData($img, array(), $lugar);
+ break;
+ case 'ir':
+ $img = new MECON_HTML_Image('/MECON/images/general_ir4', '->');
+ $link->addContents($img);
+ foreach ($campos as $campo) {
+ $link->setGetVar($this->_getVarPrefix.$campo, null);
+ }
+ $this->addRowsData($link, array(), $lugar);
+ break;
+ default:
+ $this->raiseError("No hay un ícono predefinido llamado '$id'.");
+ }
+ }
+