/** * This method deactive all the SchoolYear (put STATE's of the school years in false) */ public static function setAllUnactive() { foreach (SchoolYearPeer::doSelect(new Criteria()) as $year) { $year->setIsActive(false); $year->save(); } }