Source for file class.workshop_report.php
Documentation is available at class.workshop_report.php
* @package linea21.modules
* @subpackage workshoprep
* @author linea21 <info@linea21.com>
* @license http://opensource.org/licenses/gpl-3.0.html
* Work group report Management
public function __call($method, $arguments)
$event = $this->dispatcher->notifyUntil(new sfEvent($this, 'workshop_report.extensible_function', array(
'arguments' => $arguments
if (!$event->isProcessed())
throw new Exception(sprintf('Call to undefined method %s::%s.', get_class($this), $method));
return $event->getReturnValue();
* workshop_report::CheckDataIntegrity()
* Vérification intégrité des données
* @param array $table : contient les composants d'un compte rendu
* si verifié, sinon string 'message d'erreur'
if (strlen($table[0]) < 3) return _t('workshoprep','no_title');
if (strlen($table[1]) < 3) return _t('workshoprep','no_resume');
* workshop_report::AddWorkshopReport()
* Ajout d'un un rapport de groupe de travail
* @param array $table_workrep contient les composants du rapport
* @param object $sql_object
* @return integer $last_id
$table_workrep= $sql_object->DBescape($table_workrep);
$requete = "INSERT INTO " . $this->TDB_WORKREP . " (workrep_title, workrep_resume, workrep_workshop_id, workrep_published_date, workrep_comment, workrep_statut, workrep_date_crea) VALUES('" . $this->TITLE . "', '" . $this->RESUME . "', " . $this->WORKSHOP_ID . ", " . $this->PUBLISHED_DATE . ", '" . $this->COMMENT . "', '" . $this->STATUT . "', NOW());";
$last_id = $sql_object->DBInsert ($requete, 1);
* workshop_report::ModifyWorkshopReport()
* modification d'un rapport de groupe de travail
* @param int $ID identifiant du rapport de workshop
* @param array $table_workrep contient les composants du rapport
* @param object $sql_object
$table_workrep= $sql_object->DBescape($table_workrep);
$this->STATUT = $table_workrep[3];
$mask = $this->_HavePublishedDate($table_workrep[4]);
$requete = "UPDATE " . $this->TDB_WORKREP . " SET workrep_title='" . $this->TITLE . "', workrep_resume='" . $this->RESUME . "', workrep_comment='" . $this->COMMENT . "', workrep_statut='" . $this->STATUT . "', workrep_last_modify=NOW() " . $mask . " WHERE workrep_id='" . $this->ID . "';";
$result = $sql_object->DBQuery($requete);
* workshop_report::_HavePublishedDate()
* Détermine la date de publication a inserer dans la bdd
* @param string $current_status : statut actuel de la publication
* @return string $sql_mask
function _HavePublishedDate($current_status)
if ($current_status == 'D') $sql_mask = ", workrep_published_date= NOW()";
$sql_mask = ", workrep_published_date= '0001-01-01'";
* workshop_report::DeleteWorkshopReport()
* suppression d'un rapport de groupe de travail
* @param int $ID id du rapport de groupe de travail
* @param object $sql_object
$requete = "UPDATE " . $this->TDB_WORKREP . " set workrep_statut='E', workrep_last_modify=NOW() WHERE workrep_id='" . $this->ID . "';";
$result = $sql_object->DBQuery($requete);
|