diff --git a/libraries/src/MVC/Controller/FormController.php b/libraries/src/MVC/Controller/FormController.php index d4a424bf12869..39c2268d3fbb3 100644 --- a/libraries/src/MVC/Controller/FormController.php +++ b/libraries/src/MVC/Controller/FormController.php @@ -627,7 +627,7 @@ public function save($key = null, $urlVar = null) $app = \JFactory::getApplication(); $model = $this->getModel(); $table = $model->getTable(); - $data = $this->input->post->get('jform', array(), 'array'); + $data = $this->getSaveData(); $checkin = property_exists($table, $table->getColumnAlias('checked_out')); $context = "$this->option.edit.$this->context"; $task = $this->getTask(); @@ -937,4 +937,17 @@ public function editAssociations() $data = $input->get('jform', array(), 'array'); $model->editAssociations($data); } + + /** + * Get the data for form saving + * Allows for subclasses to get data from multiple sources (e.g. $this->input->files) + * + * @return array + * + * @since __DEPLOY_VERSION__ + */ + protected function getSaveData() + { + return $this->input->post->get('jform', array(), 'array'); + } }