Back to FormBehaviorTrait class

Method preprocessData

protected void
preprocessData
(mixed $context, mixed &$data, mixed $group = 'content')
Method to allow derived classes to preprocess the data.
Parameters
  • string $context The context identifier.
  • mixed & $data The data to be processed. It gets altered directly.
  • string $group The name of the plugin group to import (defaults to "content").
Returns
  • void
Since
  • 4.0.0

Method preprocessData - Source code

/**
 * Method to allow derived classes to preprocess the data.
 *
 * @param   string  $context  The context identifier.
 * @param   mixed   &$data    The data to be processed. It gets altered directly.
 * @param   string  $group    The name of the plugin group to import (defaults to "content").
 *
 * @return  void
 *
 * @since   4.0.0
 */
protected function preprocessData($context, &$data, $group = 'content')
{
    // Get the dispatcher and load the users plugins.
    PluginHelper::importPlugin($group);
    // Trigger the data preparation event.
    Factory::getApplication()->triggerEvent('onContentPrepareData', array($context, &$data));
}