{jcomments on}Overview

The JControllerForm class provides a controller framework for template based rendering and processing of form-based administrative views.

The constructor for JControllerForm registers the following additional tasks for the task map provided by the parent class, JControllerLegacy: 'apply', 'save2new' and 'save2copy' tasks, all of which are redirected to the JControllerForm::save method.

Properties

 

Methods

JControllerForm::add()

 PSUEDO CODE

  1. check if the relevant descendant JControllerForm object allows new objects to be created using the abstract method JControllerForm::allowAdd;
  2. clear the session state entry relating to the key provided by <option>.edit.<context>.data[1] using JApplicationCms::setUserState which itself manipulates the JRegistry session object using JRegistry::set;
  3. set the redirect property of the JControllerForm object to the URL required to [edit the object?].[2]

[1] <option> is typically the component name, whereas <context> typically refers to the particular model / view / controller to which the JControllerForm::add operation relates. Note, resolution of the session state key is performed using the PHP double quote notation which expands variable references.

[2] actual redirection typically takes place in the <component>.php file on a call to JApplication::redirect().