No me entendiste, la manera que te explique es para modificar las
funciones te voy a dar un ejemplo de mi helper solo una funcion para
que veas de que trata mi explicacion
/app/views/helperes/ejemplo.php


<?php
 class EjemploHelper extends Helper{
 var $helpers = array('Html', 'Javascript', 'Ajax');

function buttonModificado($fieldName, $htmlAttributes = array(),
$options = array(), $return = false) {

$this->Html->setFormTag($fieldName);

if (!isset($htmlAttributes['value'])) {

$htmlAttributes['value'] = $this->Html->tagValue($fieldName);

}

$htmlAttributes['type'] = 'button';



if (!isset($htmlOptions['id'])) {

$htmlAttributes['id'] = 'button' . intval(rand());

}



if ($this->Html->tagIsInvalid($this->Html->model, $this->Html->field)) {

if (isset($htmlAttributes['class']) && trim($htmlAttributes['class']) != "") {

$htmlAttributes['class'] .= ' form_error';

} else {

$htmlAttributes['class'] = 'form_error';

}

}

$options['type'] = 'click';

echo $this->output(sprintf($this->Html->tags['input'],
$this->Html->model, $this->Html->field,
$this->Html->_parseAttributes($htmlAttributes, null, ' ', ' ')),
$return);

for($i=1; $i<=10; $i++){

if (isset($options['update'.$i])) {

$options['update'] = $options['update'.$i];

$options['url'] = $options['url'.$i];

$script = $this->Javascript->event("'{$htmlAttributes['id']}'",
"click", $this->Ajax->remoteFunction($options));

echo $script;

}//FIN IF

}//FIN FOR

//return $this->output(sprintf($this->Html->tags['input'],
$this->Html->model, $this->Html->field,
$this->Html->_parseAttributes($htmlAttributes, null, ' ', ' ')),
$return);

}

}

recuerda declararlo en el controlador asi:
var $helpers = array('Html','Ajax','Javascript','Ejemplo');

y llamalo en la vista asi:
<?echo $ejemplo->buttonModificado('NombreBoton', array('url' =>
'funcionDeclaradaEnControlador')?>

--~--~---------~--~----~------------~-------~--~----~
Has recibido este mensaje porque estás suscrito a Grupo "CakePHP-es" de Grupos 
de Google.
 Si quieres publicar en este grupo, envía un mensaje de correo 
electrónico a [email protected]
 Para anular la suscripción a este grupo, envía un mensaje a [EMAIL PROTECTED]
 Para obtener más opciones, visita este grupo en 
http://groups.google.com/group/CakePHP-es?hl=es.

-~----------~----~----~----~------~----~------~--~---

Responder a