Not true. They can remove you from the company grounds and block access to all systems the moment you get fired or you hand in your resignation. But they have to pay you (if there is no "good reason" for firing you) for a varying amount of time (depending on your contract and some minimums by law).

Of course, most of the time, you can / need to stay at the company for that above mentioned varying amount of time.