The Lagrangian formulation of strong-field quantum electrodynamics in a plasma