/**
* Stock method to auto-populate the model state.
*
* @return void
*
* @since 1.6
*/
protected function populateState()
{
$table = $this->getTable();
$key = $table->getKeyName();
// Get the pk of the record from the request.
$pk = Factory::getApplication()->input->getInt($key);
$this->setState($this->getName() . '.id', $pk);
// Load the parameters.
$value = ComponentHelper::getParams($this->option);
$this->setState('params', $value);
}