He's probably referencing this Family Guy episode:
He returns again in "Brian Griffin's House of Payne" when he turns Brian's pilot for a serious drama, entitled What I Learned on Jefferson Street into a CBS sitcom called Class Holes!. While the lead role of Byron had been intended for Elijah Wood, network executives convince Griffin to cast Woods. After so many changes brought on by Woods and the executives, the show isn't even a sliver of what it was meant to be. He ends up obtaining a chimp sidekick named Mr. Nubbins, and explores the idea of starring in a buddy cop drama with him. In the end, he implies that he might face a lawsuit for having sex with his co-star whom he thinks is under 18.
Edit: image from show of James Woods, the girl mentioned, and Brian Griffin.
He's probably referencing this Family Guy episode:
Edit: image from show of James Woods, the girl mentioned, and Brian Griffin.