Conor McGregor has been banned from participating in the UFC for 18 months after violating the organisation's Anti-Doping Policy.