/**
  * Prepare execute hook.
  *
  * @return void
  */
 protected function prepareExecute()
 {
     $this->context = ContextHelper::fromController($this, 'edit');
     parent::prepareExecute();
     $this->recordId = $this->input->get($this->urlVar);
     // Populate the row id from the session.
     $this->data[$this->key] = $this->recordId;
 }
 /**
  * Instantiate the controller.
  *
  * @param   \JInput           $input   The input object.
  * @param   \JApplicationCms  $app     The application object.
  * @param   array             $config  Additional config.
  *
  * @throws  \Exception
  */
 public function __construct(\JInput $input = null, \JApplicationCms $app = null, $config = array())
 {
     parent::__construct($input, $app, $config);
     $this->context = $this->context ?: ContextHelper::fromController($this);
     $this->textPrefix = strtoupper($this->option);
 }