/**
* Method to get the data that should be injected in the form.
*
* @return mixed The data for the form.
*
* @since 3.2
*/
protected function loadFormData()
{
// Check the session for previously entered form data.
$data = Factory::getApplication()->getUserState($this->context, new \stdClass());
// Pre-fill the list options
if (!property_exists($data, 'list')) {
$data->list = array('direction' => $this->getState('list.direction'), 'limit' => $this->getState('list.limit'), 'ordering' => $this->getState('list.ordering'), 'start' => $this->getState('list.start'));
}
return $data;
}