The old way still works, but now you can instead use PHP: $form = new CustomForm($function); instead of PHP: $form = $this->getServer()->getPluginManager()->getPlugin("FormAPI")->createCustomForm($function); .