public static function initialize($idUL, $idS, $idL = 0, $idU = 0) { if ($idL > 0 && $idU > 0) { $C = new Criteria(); $C = self::getCriteriaActiu($C, $idS); $C->add(self::USUARIS_USUARISID, $idU); $C->add(self::LLISTES_IDLLISTES, $idL); $O = UsuarisllistesPeer::doSelectOne($C); } else { $O = UsuarisllistesPeer::retrieveByPK($idUL); } if (!$O instanceof UsuarisllistesPeer) { $O = new UsuarisllistesPeer(); if ($idL > 0) { $O->setLlistesIdllistes($idL); } if ($idU > 0) { $O->setUsuarisUsuarisid($idU); } $O->setSiteId($idS); $O->setActiu(true); } return new NoticiesForm($ON, array('IDS' => $idS)); }