/**
* Method to allow derived classes to preprocess the form.
*
* @param Form $form A Form object.
* @param mixed $data The data expected for the form.
* @param string $group The name of the plugin group to import (defaults to "content").
*
* @return void
*
* @see FormField
* @since 4.0.0
* @throws \Exception if there is an error in the form event.
*/
protected function preprocessForm(Form $form, $data, $group = 'content')
{
// Import the appropriate plugin group.
PluginHelper::importPlugin($group);
// Trigger the form preparation event.
Factory::getApplication()->triggerEvent('onContentPrepareForm', array($form, $data));
}