XF 2.2 Access em from within a Repository


Well-known member
Long story short, I want to perform an action any time the sendModeratorActionAlert() method is called on the Post repository. The most logical way to do this, I think, is via a Class Extension. So I have set that up and it's executing fine.

The wall I'm hitting right now is that I want to perform an action on a third-party add-on's Entity. Since this isn't in a controller, I can't call $this->em() and I'm banging my head against a wall trying to figure out how to instantiate it so that I can create a new record.

What am I missing here?