Implement the new syntax for the "apply" keyword.

Refs #5878