function editAction() { // page title $this->view->title = $this->view->getCibleText('label_static_text_edition'); // get param $identifierID = $this->_getParam('identifierID'); $order = $this->_getParam('order'); $tablePage = $this->_getParam('tablePage'); $search = $this->_getParam('search'); $paramsArray = array("order" => $order, "tablePage" => $tablePage, "search" => $search); // get static text data $staticTextData = Cible_FunctionsGeneral::getClientStaticText($identifierID, $this->_currentEditLanguage); /********** ACTIONS ***********/ $returnLink = $this->view->url(array('controller' => 'static-texts', 'action' => 'index', 'identifierID' => null)); $form = new FormStaticTexts(array('baseDir' => $this->view->baseUrl(), 'cancelUrl' => "{$returnLink}", 'identifierID' => $identifierID)); $this->view->assign('identifierID', $identifierID); $this->view->assign('form', $form); if (!$this->_request->isPost()) { $form->populate($staticTextData->toArray()); } else { $formData = $this->_request->getPost(); if ($form->isValid($formData)) { $staticTextData['ST_Value'] = $form->getValue('ST_Value'); /*$staticTextData['EU_FName'] = $form->getValue('EU_FName'); $staticTextData['EU_Email'] = $form->getValue('EU_Email'); $staticTextData['EU_Username'] = $form->getValue('EU_Username');*/ // Sauvegarde des nouvelles données $staticTextData->save(); // Sauvegarde de la cache $tag = 'client'; if (in_array($tag, array('cible', 'client'))) { $cache = Zend_Registry::get('cache'); $cache->clean(Zend_Cache::CLEANING_MODE_MATCHING_TAG, array($tag)); //$this->_redirect( 'cache' ); } header("location:" . $returnLink); } } }