AGN feedback and multiphase gas in giant elliptical galaxies