Elastoplasticity theory for porous materials