Text this: Entanglement and phase transitions in a exciton-polariton bec confined in a photonic crystal nanocavity