Literally "not be moved by it" — a classical
为...
所... passive construction ("be acted upon by ...").
为 here is wéi (2nd tone), the classical passive marker, NOT wèi ("for"). The phrase praises mental discipline, especially in the face of pressure, temptation, or emotional appeals.