1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
class delaiActions extends sfActions
{
/**
* Executes index action
*
*/
public function executeIndex()
{
$the_delais = $this->getRequestParameter('delai') ;
$the_id_delais = $this->getRequestParameter('id_delai') ;
$this->delais = $this->getDelais() ;
//$this->executeSend() ;
//si le nombre de delai modifié et envoyé
//different du nombre des identifiants
if(count($the_delais) !=0){
if(count($the_delais) !=count($the_delais)){exit() ;}
for($i=0;$i<count($the_delais);$i++)
{
$etatDossier = EtatDossierPeer::retrieveByPk($the_id_delais[$i]);
$this->forward404Unless($etatDossier);
$etatDossier->setDureeEtatDossier($the_delais[$i]);
$etatDossier->save();
}
return $this->redirect('delai');
}
}
public function getDelais(){
return EtatDossierPeer::doSelect(new Criteria());
}
public function executeSend()
{echo 'je suis ici!' ;
if ($this->getRequest()->getMethod() != sfRequest::POST)
{
// Prepare data for the template
// Display the form
return sfView::SUCCESS;
}
else
{
// Handle the form submission
$this->redirect('delai');
}
}
public function handleErrorSend()
{
// Prepare data for the template
// Display the form
return sfView::SUCCESS;
}
} |
Partager