public static function getArticle(&$dataErrors, $Titre = null, $DateParution = null, $Contenu = null, $Image = null, $Id = null) { $art = \Métier\Article::getDefaultArticle(); $dataErrors = array(); try { $art->setId($Id); } catch (Exception $e) { $dataErrors['id'] = $e->getMessage() . "<br/>\n"; } try { $art->setTitre($Titre); } catch (Exception $e) { $dataErrors['titre'] = $e->getMessage() . "<br/>\n"; } try { $art->setDateParution($DateParution); } catch (Exception $e) { $dataErrors['dateParution'] = $e->getMessage() . "<br/>\n"; } try { $art->setImage($Image); } catch (Exception $e) { $dataErrors['image'] = $e->getMessage() . "<br/>\n"; } try { $art->setContenu($Contenu); } catch (Exception $e) { $dataErrors['contenu'] = $e->getMessage() . "<br/>\n"; } return $art; }
public static function getDefaultFormHTML($action) { return self::getFormHTML($action, Article::getDefaultArticle()); }